I have used the [skip ci] command as mentioned here to skip workflow runs in GitHub action, where I am doing an auto-commit after an image is built in CI aciton using PAT and this works wonderfully!
But as the commit comment contains the [skip ci] command and right after that if I create a new Tag release, the CI workflow is not triggered because of the [skip ci].
Is there any way I can exclude the [skip ci] for tag push event and keep it only for one of my branches where ci action runs?
Auto commit in GitHub action:
on: push
jobs:
ci:
runs-on: ubuntu-latest
steps:
- name: build and push image
- name: update image tag
- name: Commit changes
run: |
git config --global user.name 'abc'
git config --global user.email 'xyz@users.noreply.github.com'
git remote add origin https://github.com/${{ github.repository }}
git config --global push.default current
git remote set-url origin https://${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/${{ github.repository }}
git commit -am "build: Image tag udpated [skip ci]"
git push
As you can see this action will run for all push events and the Commit changes step will make another commit using PAT but with [skip ci] in the comment so this same workflow is not triggered
again and it works.
But when I go to release a new tag with a new Release title and description, this action doesn't get triggered.
is there a way this can be avoided?
