|
1 | 1 | name: build-images-action |
2 | 2 |
|
| 3 | +permissions: |
| 4 | + contents: read |
| 5 | + |
3 | 6 | on: |
4 | 7 | push: |
5 | 8 | branches: |
|
8 | 11 | tags: |
9 | 12 | - 'v*' |
10 | 13 |
|
11 | | -permissions: {} |
12 | | - |
13 | | -jobs: |
14 | | - build: |
15 | | - name: Build container images |
16 | | - runs-on: ubuntu-latest |
17 | | - |
18 | | - permissions: |
19 | | - contents: read |
20 | | - |
21 | | - if: github.repository == 'metal3-io/ironic-image' |
22 | | - steps: |
23 | | - - name: build ironic image |
24 | | - uses: toptal/jenkins-job-trigger-action@137fff703dd260b52b53d3ba1960396415abc568 # 1.0.2 |
25 | | - with: |
26 | | - jenkins_url: "https://jenkins.nordix.org/" |
27 | | - jenkins_user: "metal3.bot@gmail.com" |
28 | | - jenkins_token: ${{ secrets.JENKINS_TOKEN }} |
29 | | - job_name: "metal3_ironic_container_image_building" |
30 | | - job_params: | |
31 | | - { |
32 | | - "BUILD_CONTAINER_IMAGE_GIT_REFERENCE": "${{ github.ref }}" |
33 | | - } |
34 | | - job_timeout: "3600" |
35 | | - - name: build sushy-tools image |
36 | | - uses: toptal/jenkins-job-trigger-action@137fff703dd260b52b53d3ba1960396415abc568 # 1.0.2 |
37 | | - with: |
38 | | - jenkins_url: "https://jenkins.nordix.org/" |
39 | | - jenkins_user: "metal3.bot@gmail.com" |
40 | | - jenkins_token: ${{ secrets.JENKINS_TOKEN }} |
41 | | - job_name: "metal3_sushy-tools_container_image_building" |
42 | | - job_params: | |
43 | | - { |
44 | | - "BUILD_CONTAINER_IMAGE_GIT_REFERENCE": "${{ github.ref }}" |
45 | | - } |
46 | | - job_timeout: "1000" |
47 | | - - name: build vbmc image |
48 | | - uses: toptal/jenkins-job-trigger-action@137fff703dd260b52b53d3ba1960396415abc568 # 1.0.2 |
49 | | - with: |
50 | | - jenkins_url: "https://jenkins.nordix.org/" |
51 | | - jenkins_user: "metal3.bot@gmail.com" |
52 | | - jenkins_token: ${{ secrets.JENKINS_TOKEN }} |
53 | | - job_name: "metal3_vbmc_container_image_building" |
54 | | - job_params: | |
55 | | - { |
56 | | - "BUILD_CONTAINER_IMAGE_GIT_REFERENCE": "${{ github.ref }}" |
57 | | - } |
58 | | - job_timeout: "1000" |
59 | | - - name: Slack Notification on Failure |
60 | | - if: ${{ failure() }} |
61 | | - uses: rtCamp/action-slack-notify@4e5fb42d249be6a45a298f3c9543b111b02f7907 # 2.3.0 |
62 | | - env: |
63 | | - SLACK_TITLE: 'GitHub Action Failed in ${{ github.repository }}' |
64 | | - SLACK_COLOR: '#FF0000' |
65 | | - SLACK_MESSAGE: 'The GitHub Action workflow failed for ironic image build.' |
66 | | - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} |
67 | | - SLACK_CHANNEL: metal3-github-actions-notify |
68 | | - SLACK_USERNAME: metal3-github-actions-notify |
| 14 | + build_ironic: |
| 15 | + name: Build Ironic container image |
| 16 | + uses: metal3-io/project-infra/.github/workflows/container-image-build.yml@main |
| 17 | + with: |
| 18 | + image-name: "ironic" |
| 19 | + pushImage: true |
| 20 | + secrets: |
| 21 | + QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }} |
| 22 | + QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} |
| 23 | + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} |
| 24 | + build_sushy-tools: |
| 25 | + name: Build sushy-tools image |
| 26 | + uses: metal3-io/project-infra/.github/workflows/container-image-build.yml@main |
| 27 | + with: |
| 28 | + image-name: "sushy-tools" |
| 29 | + dockerfile-directory: resources/sushy-tools |
| 30 | + pushImage: true |
| 31 | + secrets: |
| 32 | + QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }} |
| 33 | + QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} |
| 34 | + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} |
| 35 | + build_vbmc: |
| 36 | + name: build vbmc image |
| 37 | + uses: metal3-io/project-infra/.github/workflows/container-image-build.yml@main |
| 38 | + with: |
| 39 | + image-name: "vbmc" |
| 40 | + dockerfile-directory: resources/vbmc |
| 41 | + pushImage: true |
| 42 | + secrets: |
| 43 | + QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }} |
| 44 | + QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} |
| 45 | + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} |
0 commit comments