Skip to content
This repository was archived by the owner on May 27, 2026. It is now read-only.

Commit e89cd41

Browse files
committed
T8218: Updated workflows for pullrequest_target policy change
1 parent 1fd60b5 commit e89cd41

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

.github/workflows/trigger-rebuild-repo-package.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,33 @@ on:
66
- closed
77
branches:
88
- current
9+
- circinus
10+
- sagitta
911
workflow_dispatch:
1012

1113
jobs:
12-
get_repo_name:
14+
setup-vars:
1315
runs-on: ubuntu-latest
1416
outputs:
15-
PACKAGE_NAME: ${{ steps.package_name.outputs.PACKAGE_NAME }}
17+
PACKAGE_NAME: ${{ steps.vars.outputs.PACKAGE_NAME }}
18+
BRANCH: ${{ steps.vars.outputs.BRANCH }}
1619
steps:
1720
- name: Set variables
18-
id: package_name
21+
id: vars
1922
run: |
2023
echo "PACKAGE_NAME=$(basename ${{ github.repository }})" >> $GITHUB_OUTPUT
24+
if [ "${{ github.event_name }}" = "pull_request_target" ]; then
25+
echo "BRANCH=${{ github.event.pull_request.base.ref }}" >> $GITHUB_OUTPUT
26+
else
27+
echo "BRANCH=${{ github.ref_name }}" >> $GITHUB_OUTPUT
28+
fi
2129
2230
trigger-build:
23-
needs: get_repo_name
31+
needs: setup-vars
2432
uses: vyos/.github/.github/workflows/trigger-rebuild-repo-package.yml@current
2533
with:
26-
branch: ${{ github.ref_name }}
27-
package_name: ${{ needs.get_repo_name.outputs.PACKAGE_NAME }}
34+
branch: ${{ needs.setup-vars.outputs.BRANCH }}
35+
package_name: ${{ needs.setup-vars.outputs.PACKAGE_NAME }}
2836
secrets:
2937
REMOTE_OWNER: ${{ secrets.REMOTE_OWNER }}
3038
REMOTE_REUSE_REPO: ${{ secrets.REMOTE_REUSE_REPO }}

0 commit comments

Comments
 (0)