-
Notifications
You must be signed in to change notification settings - Fork 4
Description
In #7 , a pre_job step was introduced in each workflows relying on fkirc/skip-duplicate-actions.
jobs:
pre_job:
# continue-on-error: true # Uncomment once integration is finished
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
# All of these options are optional, so you can remove them if you are happy with the defaults
# Skip a workflow run if the same workflow is already running
concurrent_skipping: 'same_content_newer'
skip_after_successful_duplicate: 'true'
paths_ignore: '["**/README.md"]'
do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]'
next_job:
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'The goal was, when you push a commit with a tag, to avoid running the job twice.
In my mind it was a good idea because it would prevent from triggering release-draft twice (once for the tag, once for the push).
In fact, github.ref_type == 'tag' is only true in a job that is triggered by a tag.
So depending on which job (the tag or the push) is cancelled, the tag job may not run, which means it will not trigger release-draft, which means we don't have a draft release.
This is why we need to remove this feature, at least on rust.yml.
It should also be removed from web-host.yml, because even if it's not relying on github.ref_type == 'tag', if a tag is pushed to master and the push is skipped, the deploy step to github pages will be skipped.
An issue was already opened on the repository of the owner of skip-duplicate-actions : fkirc/skip-duplicate-actions#214 , prioritizing tags is not supported.