Skip to content

Commit f7f2cd3

Browse files
authored
release path fix
1 parent 384fdbd commit f7f2cd3

File tree

1 file changed

+35
-8
lines changed

1 file changed

+35
-8
lines changed

.github/workflows/release-controller.yaml

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@ permissions:
1313
jobs:
1414
release:
1515
runs-on: ubuntu-latest
16-
env:
17-
BUILDX_PLATFORMS: linux/amd64,linux/arm64
18-
# Override registry if needed; Makefile defaults to ghcr.io/arxignis/ingress-nginx
19-
REGISTRY: ghcr.io/arxignis/ingress-nginx
20-
# Ensure Makefile uses the Git tag as image tag
21-
TAG: ${{ github.ref_name }}
2216
steps:
2317
- name: Checkout repository
2418
uses: actions/checkout@v4
@@ -38,7 +32,40 @@ jobs:
3832
username: ${{ github.actor }}
3933
password: ${{ secrets.GITHUB_TOKEN }}
4034

41-
- name: Build and push multi-arch controller images
35+
- name: Determine base image and tag
36+
id: vars
37+
shell: bash
4238
run: |
43-
make release
39+
echo "BASE_IMAGE=$(cat NGINX_BASE)" >> $GITHUB_ENV
40+
echo "TAG=${GITHUB_REF_NAME}" >> $GITHUB_ENV
41+
echo "COMMIT_SHA=${GITHUB_SHA}" >> $GITHUB_ENV
42+
43+
- name: Build binaries for amd64 and arm64
44+
run: |
45+
make clean
46+
for arch in amd64 arm64; do ARCH=$arch make build; done
47+
48+
- name: Docker meta
49+
id: meta
50+
uses: docker/metadata-action@v5
51+
with:
52+
images: ghcr.io/${{ github.repository }}
53+
tags: |
54+
type=semver,pattern={{version}}
55+
type=semver,pattern={{major}}.{{minor}}
56+
type=semver,pattern={{major}}
57+
type=raw,value=${{ github.ref_name }}
58+
59+
- name: Build and push multi-arch image
60+
uses: docker/build-push-action@v6
61+
with:
62+
context: rootfs
63+
platforms: linux/amd64,linux/arm64
64+
push: true
65+
build-args: |
66+
BASE_IMAGE=${{ env.BASE_IMAGE }}
67+
VERSION=${{ env.TAG }}
68+
COMMIT_SHA=${{ env.COMMIT_SHA }}
69+
tags: ${{ steps.meta.outputs.tags }}
70+
labels: ${{ steps.meta.outputs.labels }}
4471

0 commit comments

Comments
 (0)