|
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 | 14 | 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/baremetal-operator' |
22 |
| - steps: |
23 |
| - - name: build bmo image |
24 |
| - uses: toptal/jenkins-job-trigger-action@137fff703dd260b52b53d3ba1960396415abc568 # 1.0.2 |
25 |
| - with: |
26 |
| - jenkins_url: "https://jenkins.nordix.org/" |
27 |
| - |
28 |
| - jenkins_token: ${{ secrets.JENKINS_TOKEN }} |
29 |
| - job_name: "metal3_baremetal-operator_container_image_building" |
30 |
| - job_params: | |
31 |
| - { |
32 |
| - "BUILD_CONTAINER_IMAGE_GIT_REFERENCE": "${{ github.ref }}" |
33 |
| - } |
34 |
| - job_timeout: "1000" |
35 |
| - - name: build keepalived image |
36 |
| - uses: toptal/jenkins-job-trigger-action@137fff703dd260b52b53d3ba1960396415abc568 # 1.0.2 |
37 |
| - with: |
38 |
| - jenkins_url: "https://jenkins.nordix.org/" |
39 |
| - |
40 |
| - jenkins_token: ${{ secrets.JENKINS_TOKEN }} |
41 |
| - job_name: "metal3_keepalived_container_image_building" |
42 |
| - job_params: | |
43 |
| - { |
44 |
| - "BUILD_CONTAINER_IMAGE_GIT_REFERENCE": "${{ github.ref }}" |
45 |
| - } |
46 |
| - job_timeout: "1000" |
47 |
| - - name: Slack Notification on Failure |
48 |
| - if: ${{ failure() }} |
49 |
| - uses: rtCamp/action-slack-notify@4e5fb42d249be6a45a298f3c9543b111b02f7907 # 2.3.0 |
50 |
| - env: |
51 |
| - SLACK_TITLE: 'GitHub Action Failed in ${{ github.repository }}' |
52 |
| - SLACK_COLOR: '#FF0000' |
53 |
| - SLACK_MESSAGE: 'The GitHub Action workflow failed for baremetal operator image build.' |
54 |
| - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} |
55 |
| - SLACK_CHANNEL: metal3-github-actions-notify |
56 |
| - SLACK_USERNAME: metal3-github-actions-notify |
| 15 | + build_bmo: |
| 16 | + name: Build BMO container image |
| 17 | + uses: metal3-io/project-infra/.github/workflows/container-image-build.yml@main |
| 18 | + with: |
| 19 | + image-name: "baremetal-operator" |
| 20 | + pushImage: true |
| 21 | + secrets: |
| 22 | + QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }} |
| 23 | + QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} |
| 24 | + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} |
| 25 | + build_keepalived: |
| 26 | + name: Build keepalived container image |
| 27 | + uses: metal3-io/project-infra/.github/workflows/container-image-build.yml@main |
| 28 | + with: |
| 29 | + image-name: "keepalived" |
| 30 | + dockerfile-directory: resources/keepalived-docker |
| 31 | + pushImage: true |
| 32 | + secrets: |
| 33 | + QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }} |
| 34 | + QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} |
| 35 | + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} |
0 commit comments