Skip to content

Commit

Permalink
🤖 Release arm generic artifacts on release (#1315)
Browse files Browse the repository at this point in the history
* 🤖 Release arm generic artifacts on release

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>

* Update release-arm.yaml

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>

---------

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
  • Loading branch information
Itxaka authored Apr 18, 2023
1 parent d7d9478 commit 434edb5
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/image-arm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:
name: ${{ matrix.flavor }}-image
path: build
if-no-files-found: error
iso:
image_and_iso_arm64_generic:
runs-on: ubuntu-latest
needs:
- get-matrix
Expand Down Expand Up @@ -149,16 +149,15 @@ jobs:
- name: Build iso 🔧
env:
IMAGE: "quay.io/kairos/core-${{ matrix.flavor }}-arm-generic"
TAG: "latest"
TAG: "master"
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
run: |
earthly --platform=linux/arm64 +image --FLAVOR=${{ matrix.flavor }} --IMAGE=$IMAGE
earthly --platform=linux/arm64 +iso --FLAVOR=${{ matrix.flavor }} --IMAGE=$IMAGE
earthly -P +all-arm-generic --FLAVOR=${{ matrix.flavor }} --IMAGE=$IMAGE:$TAG --ISO_NAME=kairos-${{ matrix.flavor }}-arm-generic-$TAG
- name: Push to quay
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
env:
IMAGE: "quay.io/kairos/core-${{ matrix.flavor }}-arm-generic"
TAG: "latest"
TAG: "master"
run: |
docker push "$IMAGE:$TAG"
- uses: actions/upload-artifact@v3
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/release-arm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,47 @@ jobs:
with:
sarif_file: 'sarif'
category: ${{ matrix.flavor }}
image_and_iso_arm64_generic:
runs-on: ubuntu-latest
needs:
- get-matrix
strategy:
fail-fast: false
matrix:
flavor:
- "opensuse-leap"
steps:
- uses: actions/checkout@v3
- name: Install earthly
uses: Luet-lab/luet-install-action@v1
with:
repository: quay.io/kairos/packages
packages: utils/earthly
- name: Set up QEMU
uses: docker/setup-qemu-action@master
with:
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Login to Quay Registry
run: echo ${{ secrets.QUAY_PASSWORD }} | docker login -u ${{ secrets.QUAY_USERNAME }} --password-stdin quay.io
- name: Build iso 🔧
env:
IMAGE: "quay.io/kairos/core-${{ matrix.flavor }}-arm-generic"
run: |
export TAG=${GITHUB_REF##*/}
earthly +all-arm-generic --FLAVOR=${{ matrix.flavor }} --IMAGE=$IMAGE:$TAG --ISO_NAME=kairos-${{ matrix.flavor }}-arm-generic-$TAG
sudo mv build release
- name: Push to quay
env:
IMAGE: "quay.io/kairos/core-${{ matrix.flavor }}-arm-generic"
run: |
export TAG=${GITHUB_REF##*/}
docker push "$IMAGE:$TAG"
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
release/*
4 changes: 4 additions & 0 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ all-arm:
BUILD +grype-scan
BUILD +arm-image

all-arm-generic:
BUILD --platform=linux/arm64 +image
BUILD --platform=linux/arm64 +iso

go-deps:
ARG GO_VERSION
FROM golang:$GO_VERSION
Expand Down

0 comments on commit 434edb5

Please sign in to comment.