Skip pre-commit in action when committing the master tag back
This commit is contained in:
@@ -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 protected]" >> $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
|
||||
working_directory: ./test
|
||||
|
||||
Reference in New Issue
Block a user