Skip to content

Commit

Permalink
Use custom buildah commands instead of action
Browse files Browse the repository at this point in the history
  • Loading branch information
julianschuler committed Jun 19, 2024
1 parent 5d4e74e commit db62afa
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/')
Expand Down

0 comments on commit db62afa

Please sign in to comment.