From db62afa25e8cc8fba007583bd40d77fa5afba8f5 Mon Sep 17 00:00:00 2001 From: Julian Schuler Date: Wed, 19 Jun 2024 17:52:45 +0200 Subject: [PATCH] Use custom buildah commands instead of action --- .github/workflows/cicd.yml | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 0627a17..053621c 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -12,6 +12,8 @@ jobs: options: --user=1000:1000 env: version: 7.5.0 + registry: ghcr.io/${{ github.repository_owner }} + tag: {{ env.registry }}/naosdk:${{ env.version }} steps: - name: Checkout repository uses: actions/checkout@v4 @@ -28,23 +30,19 @@ jobs: run: kas build --target nao-image --cmd populate_sdk meta-nao/kas/base.yml:meta-nao/kas/hulks.yml - name: Build SDK (aarch64) run: kas build --target nao-image --cmd populate_sdk meta-nao/kas/base.yml:meta-nao/kas/hulks.yml:meta-nao/kas/aarch64.yml - - name: Build development image - id: build-image - uses: redhat-actions/buildah-build@v2 - with: - image: naosdk - tags: latest ${{ github.sha }} ${{ env.version }} - archs: x86_64, aarch64 - containerfiles: ./Containerfile - build-args: version=${{ env.version }} - - name: Push development image to ghcr.io - uses: redhat-actions/push-to-registry@v2 + - name: Log in to ghcr.io + uses: redhat-actions/podman-login@v1 with: - image: ${{ steps.build-image.outputs.image }} - tags: ${{ steps.build-image.outputs.tags }} - registry: ghcr.io/${{ github.repository_owner }} username: ${{ github.actor }} password: ${{ github.token }} + registry: ${{ env.registry }} + - name: Build development image + run: | + buildah manifest exists naosdk || buildah manifest create naosdk + sudo buildah bud --arch x86_64 --manifest naosdk --tag ${{ env.tag }} + sudo buildah bud --arch aarch64 --manifest naosdk --tag ${{ env.tag }} + - name: Push development image to ghcr.io + buildah manifest push --all naosdk "docker://{{ env.tag }}" - name: Release uses: softprops/action-gh-release@v2 if: startsWith(github.ref, 'refs/tags/')