diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3a9cb5d..c5db97f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,20 +45,20 @@ jobs: if [[ "${{ github.ref }}" == "refs/heads/master" ]]; then echo "DOCKER_TAG=master" >> $GITHUB_ENV yarn set-docker-tag master - + if ! git diff --quiet action.yml; then echo "GIT_COMMITTER_NAME=getsentry-bot" >> $GITHUB_ENV; echo "GIT_AUTHOR_NAME=getsentry-bot" >> $GITHUB_ENV; echo "EMAIL=bot@sentry.io" >> $GITHUB_ENV; - + git add action.yml - git commit -m "chore: Set docker tag for master [skip-ci]" + SKIP=set-docker-tag-from-branch git commit -m "chore: Set docker tag for master [skip-ci]" git push fi else TAG=$(yq '... | select(has("uses") and .uses | test("docker://ghcr.io/getsentry/action-release-image:.*")) | .uses' action.yml | awk -F':' '{print $3}') echo "DOCKER_TAG=$TAG" >> $GITHUB_ENV - + if [[ "${{ github.event_name }}" == "pull_request" ]]; then if [[ "$TAG" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then echo "Error: DOCKER_TAG $TAG matching format MAJOR.MINOR.PATCH is not allowed inside pull requests." @@ -205,4 +205,4 @@ jobs: MOCK: true with: environment: production - working_directory: ./test \ No newline at end of file + working_directory: ./test