-
Notifications
You must be signed in to change notification settings - Fork 23
58 lines (51 loc) · 2.02 KB
/
docker-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# This is a GitHub workflow defining a set of jobs with a set of steps.
# ref: https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions
#
# This test is meant to verify that our Dockerfile can build successfully when
# changed on the CPU architectures we have made it support being built on.
#
name: Build ibm-powervs-block-csi-driver-centos-base
on:
push:
paths:
- "build/base/Dockerfile"
- ".github/workflows/docker-build.yml"
jobs:
docker:
name: Build ibm-powervs-block-csi-driver-centos-base
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout sources
uses: actions/checkout@v4
# Action reference: https://github.com/docker/setup-qemu-action
- name: Set up QEMU (for docker buildx)
uses: docker/setup-qemu-action@v3
# Action reference: https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# Action reference: https://github.com/docker/login-action
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
# Convert repository owner name into lowercase letters
# Action reference: https://github.com/ASzc/change-string-case-action
- id: repository_owner
name: lower case repository owner name
uses: ASzc/change-string-case-action@v6
with:
string: ${{ github.repository_owner }}
# Action reference: https://github.com/docker/build-push-action
- name: Build container
uses: docker/build-push-action@v5
with:
context: ./build/base
platforms: linux/amd64,linux/ppc64le
target: centos-base
push: true
tags: ghcr.io/${{ steps.repository_owner.outputs.lowercase }}/ibm-powervs-block-csi-driver-centos-base:v8.0.0