diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml index d40243aa2e2..fa33910adac 100644 --- a/.github/workflows/draft-release.yml +++ b/.github/workflows/draft-release.yml @@ -35,7 +35,9 @@ jobs: if: steps.regex-match.outputs.group1 != '' run: | echo "::set-output name=applicable::true" - echo "This is a release commit: ${{ steps.regex-match.outputs.group1 }}" + echo "This is a release commit: ${STEPS_REGEX_MATCH_OUTPUTS_GROUP1}" + env: + STEPS_REGEX_MATCH_OUTPUTS_GROUP1: ${{ steps.regex-match.outputs.group1 }} outputs: applicable: ${{ steps.check-commit-message.outputs.applicable }} version: ${{ steps.regex-match.outputs.group1 }} @@ -55,15 +57,17 @@ jobs: - name: Calculate Tag and Release names run: | - echo TAG_NAME="v${{ needs.check.outputs.version }}" >> $GITHUB_ENV - echo RELEASE_NAME="v${{ needs.check.outputs.version }} Release" >> $GITHUB_ENV + echo TAG_NAME="v${NEEDS_CHECK_OUTPUTS_VERSION}" >> $GITHUB_ENV + echo RELEASE_NAME="v${NEEDS_CHECK_OUTPUTS_VERSION} Release" >> $GITHUB_ENV + env: + NEEDS_CHECK_OUTPUTS_VERSION: ${{ needs.check.outputs.version }} - name: Create and push Tag run: | git config --local user.email "action@github.com" git config --local user.name "GitHub Action" - git tag -a ${{ env.TAG_NAME }} -m "${{ env.RELEASE_NAME }}" - git push origin ${{ env.TAG_NAME }} + git tag -a ${TAG_NAME} -m "${RELEASE_NAME}" + git push origin ${TAG_NAME} - name: Install gsutil run: | @@ -79,10 +83,10 @@ jobs: while [ $found -lt 10 -a $retries -gt 0 ] do sleep 3m - found=$(gsutil du gs://skaffold/releases/${{ env.TAG_NAME }}/ | wc -l) + found=$(gsutil du gs://skaffold/releases/${TAG_NAME}/ | wc -l) retries=$((retries-1)) done - gsutil -m cp -r gs://skaffold/releases/${{ env.TAG_NAME }}/ $HOME + gsutil -m cp -r gs://skaffold/releases/${TAG_NAME}/ $HOME - name: Create Release shell: bash @@ -90,9 +94,9 @@ jobs: curl -fsSL https://github.com/github/hub/raw/master/script/get | bash -s 2.14.1 body=$(git log -p --follow -1 CHANGELOG.md | grep '^\+' | cut -c 2- | tail -n +2) assets=() - for asset in $HOME/${{ env.TAG_NAME }}/*; do + for asset in $HOME/${TAG_NAME}/*; do assets+=("-a" "$asset") done - bin/hub release create "${assets[@]}" -m "${{ env.RELEASE_NAME }}" -m "$body" --draft ${{ env.TAG_NAME }} + bin/hub release create "${assets[@]}" -m "${RELEASE_NAME}" -m "$body" --draft ${TAG_NAME} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/performance-comparison.yml b/.github/workflows/performance-comparison.yml index 5f950f1a0b2..d478b482285 100644 --- a/.github/workflows/performance-comparison.yml +++ b/.github/workflows/performance-comparison.yml @@ -98,7 +98,9 @@ jobs: - name: Make and install Skaffold binary from current PR run: | make - sudo install "${HOME}/work/skaffold/skaffold/out/skaffold" /usr/local/bin/skaffold-${{ steps.comment-branch.outputs.head_ref }} + sudo install "${HOME}/work/skaffold/skaffold/out/skaffold" /usr/local/bin/skaffold-${STEPS_COMMENT_BRANCH_OUTPUTS_HEAD_REF} + env: + STEPS_COMMENT_BRANCH_OUTPUTS_HEAD_REF: ${{ steps.comment-branch.outputs.head_ref }} - name: Install Skaffold from main branch (built from CI/CD on merge) run: | @@ -107,18 +109,22 @@ jobs: - name: Parse Comment To Yaml Format run: | - tail -n +2 <<< '${{ github.event.comment.body }}' > yaml-input-file.yaml + tail -n +2 <<< '${GITHUB_EVENT_COMMENT_BODY}' > yaml-input-file.yaml + env: + GITHUB_EVENT_COMMENT_BODY: ${{ github.event.comment.body }} - name: Run performance comparison benchmarks id: run-performance-comparison-benchmarks run: | - /usr/local/bin/skaffold-${{ steps.comment-branch.outputs.head_ref }} config set --global collect-metrics false - make COMPARISONSTATS_ARGS='--summary-output-path=gh-comment.txt --yaml-input-file=yaml-input-file.yaml --warmup-runs=1 /usr/local/bin/skaffold-from-main-branch /usr/local/bin/skaffold-${{ steps.comment-branch.outputs.head_ref }} helm-deployment main.go "//per-dev-iteration-comment"' comparisonstats + /usr/local/bin/skaffold-${STEPS_COMMENT_BRANCH_OUTPUTS_HEAD_REF} config set --global collect-metrics false + make COMPARISONSTATS_ARGS='--summary-output-path=gh-comment.txt --yaml-input-file=yaml-input-file.yaml --warmup-runs=1 /usr/local/bin/skaffold-from-main-branch /usr/local/bin/skaffold-${STEPS_COMMENT_BRANCH_OUTPUTS_HEAD_REF} helm-deployment main.go "//per-dev-iteration-comment"' comparisonstats body=$(cat gh-comment.txt) body="${body//'%'/'%25'}" body="${body//$'\n'/'%0A'}" body="${body//$'\r'/'%0D'}" echo ::set-output name=body::$body + env: + STEPS_COMMENT_BRANCH_OUTPUTS_HEAD_REF: ${{ steps.comment-branch.outputs.head_ref }} - name: Create comment uses: peter-evans/create-or-update-comment@c9fcb64660bc90ec1cc535646af190c992007c32