mirror of
https://github.com/vyos/vyos-build.git
synced 2025-10-01 20:28:40 +02:00
Merge pull request #810 from vyos/evgsentrium/T6771
actions: T6771: Build docker image without Jenkins
This commit is contained in:
commit
984654139c
47
.github/workflows/trigger-docker-image-build.yml
vendored
Normal file
47
.github/workflows/trigger-docker-image-build.yml
vendored
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
name: Trigger Docker image build
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request_target:
|
||||||
|
types:
|
||||||
|
- closed
|
||||||
|
branches:
|
||||||
|
- current
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
packages: write
|
||||||
|
contents: read
|
||||||
|
attestations: write
|
||||||
|
id-token: write
|
||||||
|
pull-requests: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
track-changes:
|
||||||
|
if: github.event.pull_request.merged == true
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
env:
|
||||||
|
REF: main # Used for curl to trigger image build
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout vyos/vyos-build repo
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ github.ref_name }}
|
||||||
|
|
||||||
|
- uses: dorny/paths-filter@v3
|
||||||
|
id: changes
|
||||||
|
with:
|
||||||
|
filters: |
|
||||||
|
docker-dir:
|
||||||
|
- 'docker/**'
|
||||||
|
|
||||||
|
- name: "Trigger Docker image build for ${{ github.ref_name }}"
|
||||||
|
if: ${{ steps.changes.outputs.docker-dir }}
|
||||||
|
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-docker-image.yml/dispatches \
|
||||||
|
-d '{"ref": "${{ env.REF }}", "inputs":{"branch":"${{ github.ref_name }}", "environment":"production"}}'
|
||||||
Loading…
x
Reference in New Issue
Block a user