forked from Jahia/jahia
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TECH-1001: Using a variable instead of a set name to trigger remote w…
…orkflow (#1391)
- Loading branch information
1 parent
4b75d0e
commit 6127cda
Showing
1 changed file
with
17 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -291,12 +291,28 @@ jobs: | |
runs-on: ubuntu-latest | ||
needs: [integration-tests, sonar-analysis, security-scan, vulnerability-scan, build] | ||
steps: | ||
- name: Get branch name | ||
id: branch-name | ||
uses: tj-actions/[email protected] | ||
- name: Preparing variables for remote branch | ||
id: exports | ||
shell: bash | ||
run: | | ||
# If we are in a PR, we use master for the remote branch | ||
# If we are not in a PR, we use the current branch for the remote branch | ||
if [[ "${{ github.event.pull_request.head.ref }}" == "" ]]; then | ||
echo "Currently NOT in a PR: ${{ github.event.pull_request.head.ref }}, using ${{ steps.branch-name.outputs.current_branch }} as remote branch" | ||
echo "remote_branch=${{ steps.branch-name.outputs.current_branch }}" >> $GITHUB_OUTPUT | ||
else | ||
echo "Currently in a PR with head: ${{ github.event.pull_request.head.ref }}, using master as remote branch" | ||
echo "remote_branch=master" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Call Jahia-pack-private | ||
id: trigger-step | ||
uses: jonas-schievink/workflow-proxy@v1 | ||
with: | ||
workflow: do-it-all.yml | ||
ref: master | ||
ref: ${{ steps.exports.outputs.remote_branch }} | ||
repo: Jahia/jahia-pack-private | ||
wait-for-completion-timeout: 2h | ||
inputs: '{ "parent_image_tag": "${{needs.build.outputs.image_tag}}" }' | ||
|