diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2024-09-11 15:49:03 +0000 |
---|---|---|
committer | Viacheslav Hletenko <v.gletenko@vyos.io> | 2024-09-11 15:49:03 +0000 |
commit | 7cd6f53c142534ca04197b0ce004b684de0a1264 (patch) | |
tree | 55b6640f4748d0302789026f1c9508ff810fcfe5 | |
parent | de8d388c9cf32eb9ef9f38abb2d6ba292f56069f (diff) | |
download | vyos-1x-7cd6f53c142534ca04197b0ce004b684de0a1264.tar.gz vyos-1x-7cd6f53c142534ca04197b0ce004b684de0a1264.zip |
T6674: Trigger reuseable build repo package
-rw-r--r-- | .github/workflows/trigger-rebuild-repo-package.yml | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/.github/workflows/trigger-rebuild-repo-package.yml b/.github/workflows/trigger-rebuild-repo-package.yml index 9c1176b01..01903162e 100644 --- a/.github/workflows/trigger-rebuild-repo-package.yml +++ b/.github/workflows/trigger-rebuild-repo-package.yml @@ -1,32 +1,34 @@ name: Trigger to build a deb package from repo on: - pull_request: - types: - - closed + #pull_request: + # types: + # - closed + # branches: + # - current + push: branches: - - current + - sever-sever workflow_dispatch: jobs: trigger-build: - if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch' + #if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch' runs-on: ubuntu-latest - env: - REF: main # Used for curl to trigger build package - steps: - name: Set variables run: | echo "PACKAGE_NAME=$(basename ${{ github.repository }})" >> $GITHUB_ENV - - name: Trigger rebuild for ${{ env.PACKAGE_NAME }} - run: | - curl -L \ - -X POST \ - -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer ${{ secrets.PAT }}" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - https://api.github.com/repos/${{ secrets.REMOTE_OWNER }}/${{ secrets.REMOTE_REUSE_REPO }}/actions/workflows/build-package.yml/dispatches \ - -d '{"ref": "${{ env.REF }}", "inputs":{"package_name":"'"$PACKAGE_NAME"'", "gpg_key_id": "${{ secrets.GPG_KEY_ID }}", "package_branch": "${{ github.ref_name }}"}}' + - name: Trigger build for ${{ env.PACKAGE_NAME }} + uses: vyos/vyos-workflow-testing/.github/workflows/trigger-package-build.yml@main + with: + branch: ${{ github.ref_name }} + package_name: ${{ env.PACKAGE_NAME }} + REF: main # optinal because the default value is main + secrets: + REMOTE_OWNER: ${{ secrets.REMOTE_OWNER }} + REMOTE_REUSE_REPO: ${{ secrets.REMOTE_REUSE_REPO }} + GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} + PAT: ${{ secrets.PAT }} |