From f04a96e7c2360abd97a7997199372c114e1f30ac Mon Sep 17 00:00:00 2001 From: Jose Costa Teixeira Date: Tue, 15 Oct 2024 19:02:33 +0100 Subject: [PATCH] Update publication-accepted.yml --- .github/workflows/publication-accepted.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publication-accepted.yml b/.github/workflows/publication-accepted.yml index c5e9d02964..232bb945ad 100644 --- a/.github/workflows/publication-accepted.yml +++ b/.github/workflows/publication-accepted.yml @@ -21,6 +21,9 @@ jobs: VERSION=$(jq -r '.version' publication-request.json) echo "VERSION=$VERSION" >> $GITHUB_ENV + - name: Get current branch + run: echo "BRANCH=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV + # Create a release and tag with the version - name: Create release and tag uses: actions/create-release@v1 @@ -32,10 +35,9 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # Job to trigger the reusable workflow - trigger_remote_workflow: - needs: create_release_and_tag - uses: WorldHealthOrganization/smart-html/.github/workflows/release.yml@main - with: - branch: ${{ env.BRANCH }} # Pass the current branch to the remote workflow + # Trigger the remote reusable workflow and pass the current branch + - name: Trigger remote workflow + uses: WorldHealthOrganization/smart-html/.github/workflows/release.yml@main + with: + branch: ${{ env.BRANCH }} # Pass the current branch to the remote workflow