Closed HassanAkbar closed 11 months ago
@HassanAkbar I’m not sure if I’m missing something, but what is the actual reason deployment was failing?
From github documentation of GITHUB_REF
The fully-formed ref of the branch or tag that triggered the workflow run. For workflows triggered by push, this is the branch or
tag ref that was pushed. For workflows triggered by pull_request, this is the pull request merge branch. For workflows
triggered by release, this is the release tag created. For other triggers, this is the branch or tag ref that triggered the workflow
run. This is only set if a branch or tag is available for the event type. The ref given is fully-formed, meaning that for branches
the format is refs/heads/<branch_name>, for pull requests it is refs/pull/<pr_number>/merge, and for tags it is
refs/tags/<tag_name>. For example, refs/heads/feature-branch-1.
@strogonoff we were dispatching deploy action to isotc211.geolexica.org
which tries to fetch the branch using GITHUB_REF
and because there was no branch named like refs/pull/<pr_number>/merge
so the CI was failing.
Currently, the deployment was getting triggered for
isotc211.geolexica.org
every time a commit was added to any PR and it was failing. e.g -> https://github.com/geolexica/isotc211.geolexica.org/actions/runs/7136063729So added the check to only trigger downstream repos when something is merged in main or staging or a tag is added.
closes geolexica/isotc211.geolexica.org#201