@@ -4,76 +4,21 @@ concurrency:
44 cancel-in-progress : true
55
66on :
7+ pull_request :
8+ types : [opened, synchronize, reopened]
79 push :
810 branches :
911 - master
1012 - next_release/*
1113 - release/*
1214
13- env :
14- CONTAINER_NAME : ubiqube/cld-blueprint-installer
15-
1615jobs :
1716 build-and-publish :
18- name : Build and Publish Docker Image
19- runs-on : ubuntu-latest # self-hosted
20- permissions :
21- id-token : write
22- packages : write
23- contents : read
24- attestations : write
25-
26- steps :
27- - name : Checkout latest code
28- uses : actions/checkout@v4
29-
30- - name : Set up Docker Buildx
31- uses : docker/setup-buildx-action@v3
32-
33- - name : Login to GitHub Container Registry
34- if : github.event_name != 'pull_request'
35- uses : docker/login-action@v3
36- with :
37- username : ${{ secrets.DOCKER_HUB_USERNAME }}
38- password : ${{ secrets.DOCKER_HUB_TOKEN }}
39-
40- - name : Docker meta
41- id : meta
42- uses : docker/metadata-action@v5
43- with :
44- images : " ${{ env.CONTAINER_NAME }}"
45- tags : |
46- type=sha,format=long
47- latest
48-
49- - name : Build Docker image and publish to Docker Hub
50- id : push
51- uses : docker/build-push-action@v6
52- with :
53- context : .
54- push : ${{ github.event_name != 'pull_request' }}
55- provenance : mode=max
56- sbom : true
57- tags : " ${{ steps.meta.outputs.tags }}"
58- labels : ${{ steps.meta.outputs.labels }}
59-
60- - name : Set latest commit message as env variable
61- run : echo LATEST_COMMIT_MESSAGE=$(git log -1 --oneline ${{ github.event.after }} | jq -Rs .) >> $GITHUB_ENV
62-
63- - name : Notify msa-docker repo about updated ${{ env.CONTAINER_NAME }} Docker image
64- uses : benc-uk/workflow-dispatch@v1
65- if : github.event_name != 'pull_request'
66- with :
67- token : ${{ secrets.MSA_DOCKER_REPO_ACCESS_TOKEN }}
68- ref : ${{ github.ref_name || 'master' }}
69- repo : ubiqube/msa-docker
70- workflow : create-pr.yml
71- inputs : |-
72- {
73- "image_name": "${{ env.CONTAINER_NAME }}",
74- "image_tag": "sha-${{ github.sha }}",
75- "latest_commit_message": ${{ env.LATEST_COMMIT_MESSAGE }},
76- "team_reviewers": "${{ env.REVIEWERS }}",
77- "branch_name": "${{ github.ref_name }}"
78- }
17+ uses : openmsa/openmsa-gha/.github/workflows/normal-build.yaml@master
18+ secrets :
19+ DOCKER_HUB_USERNAME : ${{ secrets.DOCKER_HUB_USERNAME }}
20+ DOCKER_HUB_TOKEN : ${{ secrets.DOCKER_HUB_TOKEN }}
21+ REPO_ACCESS_TOKEN : ${{ secrets.MSA_DOCKER_REPO_ACCESS_TOKEN }}
22+ with :
23+ container-name : ubiqube/cld-blueprint-installer
7924
0 commit comments