Skip to content

Commit 19d67b7

Browse files
authored
ci: push to ghcr.io using version tag (#27)
1 parent c909d05 commit 19d67b7

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: CI
22

33
on:
44
push:
5+
branches:
6+
- main
57
tags:
68
- v*
79
pull_request: {}
@@ -63,7 +65,6 @@ jobs:
6365
matrix:
6466
arch:
6567
- amd64
66-
- arm64
6768
steps:
6869
- name: Setup QEMU
6970
uses: docker/setup-qemu-action@v3
@@ -107,6 +108,9 @@ jobs:
107108
- name: Build Package
108109
run: ./crossplane xpkg build --package-file=${{ matrix.arch }}.xpkg --package-root=package/ --embed-runtime-image-tarball=runtime-${{ matrix.arch }}.tar
109110

110-
- name: Upload Package
111-
if: ${{ steps.release.outputs.release_created }}
112-
run: ./crossplane xpkg push -f ${{ matrix.arch }}.xpkg ghcr.io/statnett/function-s3-user-arn:${{ steps.release.outputs.tag_name }}
111+
- name: Extract version from tag
112+
run: echo "TAG=$(basename $GITHUB_REF_NAME)" >> $GITHUB_ENV
113+
114+
- name: Push Crossplane Package
115+
if: startsWith(github.ref, 'refs/tags/v')
116+
run: ./crossplane xpkg push -f ${{ matrix.arch }}.xpkg ghcr.io/statnett/function-s3-user-arn-${{ matrix.arch }}:${{ env.TAG }}

0 commit comments

Comments
 (0)