File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,29 +28,41 @@ on: # yamllint disable-line rule:truthy
2828
2929jobs :
3030 deploy :
31- runs-on : ubuntu-22.04
31+ runs-on : ubuntu-24.04
32+ permissions :
33+ contents : read
34+ packages : write
35+ attestations : write
36+ id-token : write
3237 steps :
3338 - name : checkout
3439 uses : actions/checkout@v6
3540 with :
3641 path : src
3742 fetch-depth : 0
43+
3844 - name : Set up QEMU
3945 id : qemu
4046 # yamllint disable-line rule:line-length
4147 uses : docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
4248 with :
43- image : tonistiigi/binfmt:qemu-v7.0.0-28
49+ image : tonistiigi/binfmt:qemu-v10.2.1-65
4450 platforms : all
51+
52+ - name : Set up Docker Buildx
53+ uses : docker/setup-buildx-action@v3
54+
4555 - name : Available platforms
4656 run : echo ${{ steps.qemu.outputs.platforms }}
57+
4758 - name : Login to GitHub Container Registry
4859 # yamllint disable-line rule:line-length
4960 uses : docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
5061 with :
5162 registry : ghcr.io
5263 username : ${{ github.repository_owner }}
5364 password : ${{ secrets.GITHUB_TOKEN }}
65+
5466 - name : Build and Push Docker Image
5567 env :
5668 DOCKER_REPO : ghcr.io/${{ github.repository }}
Original file line number Diff line number Diff line change 1515# limitations under the License.
1616
1717if [[ -n " ${DOCKER_MULTIARCH} " ]]; then
18-
19- docker buildx create --name yetus-multiarch --driver docker-container --use \
18+ BUILDER_NAME= " yetus-multiarch- $( date +%s ) "
19+ docker buildx create --name " ${BUILDER_NAME} " --driver docker-container --use \
2020 || docker buildx use yetus-multiarch \
2121 || exit 1
2222 docker buildx inspect --bootstrap || exit 1
2323
2424 traphandler () {
25- docker buildx rm yetus-multiarch || true
25+ docker buildx rm " ${BUILDER_NAME} " || true
2626 }
2727
2828 trap traphandler HUP INT QUIT TERM
@@ -111,6 +111,7 @@ BUILDERINSTANCE=$(docker buildx inspect --bootstrap | grep Driver)
111111PLATARRAY=()
112112
113113if [[ " ${BUILDERINSTANCE} " =~ docker-container ]]; then
114+ PLATFORMS=()
114115 KNOWN_PLATFORMS=$( docker buildx inspect --bootstrap | grep Platforms)
115116
116117 if [[ ${KNOWN_PLATFORMS} =~ linux/amd64 ]]; then
@@ -136,6 +137,7 @@ opencontainerslabels "base"
136137
137138# Build the -base image
138139docker buildx build \
140+ --no-cache \
139141 " ${PLATARRAY[@]} " \
140142 " ${LABELS[@]} " \
141143 --tag " ${DOCKER_REPO} -base:${DOCKER_TAG} " \
@@ -146,6 +148,7 @@ opencontainerslabels "full"
146148
147149# Build the full image using base above
148150docker buildx build \
151+ --no-cache \
149152 " ${PLATARRAY[@]} " \
150153 --label " org.opencontainers.image.base.name=${DOCKER_REPO} -base:${DOCKER_TAG} " \
151154 " ${LABELS[@]} " \
You can’t perform that action at this time.
0 commit comments