diff --git a/.github/workflows/release-arm.yaml b/.github/workflows/release-arm.yaml deleted file mode 100644 index f36e83ee..00000000 --- a/.github/workflows/release-arm.yaml +++ /dev/null @@ -1,130 +0,0 @@ -name: 'Build arm images' - -on: - push: - tags: - - '*' - -jobs: - get-matrix: - runs-on: ubuntu-latest - outputs: - matrix: ${{ steps.set-matrix.outputs.matrix }} - steps: - - uses: actions/checkout@v3 - - run: | - git fetch --prune --unshallow - - id: set-matrix - run: | - content=`cat ./releases-arm.json` - # the following lines are only required for multi line json - content="${content//'%'/'%25'}" - content="${content//$'\n'/'%0A'}" - content="${content//$'\r'/'%0D'}" - # end of optional handling for multi line json - echo "::set-output name=matrix::{\"include\": $content }" - - docker: - runs-on: ubuntu-latest - needs: - - get-matrix - permissions: - id-token: write # OIDC support - contents: write - strategy: - fail-fast: false - matrix: ${{fromJson(needs.get-matrix.outputs.matrix)}} - steps: - - name: Release space from worker - run: | - sudo rm -rf /usr/local/lib/android # will release about 10 GB if you don't need Android - sudo rm -rf /usr/share/dotnet # will release about 20GB if you don't need .NET - - uses: actions/checkout@v3 - - run: | - git fetch --prune --unshallow - - name: Set up QEMU - uses: docker/setup-qemu-action@master - with: - platforms: all - - name: Install Cosign - uses: sigstore/cosign-installer@main - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Login to DockerHub - uses: docker/login-action@v2 - with: - registry: quay.io - username: ${{ secrets.QUAY_USERNAME }} - password: ${{ secrets.QUAY_PASSWORD }} - - name: Build 🔧 - env: - FLAVOR: ${{ matrix.flavor }} - MODEL: ${{ matrix.model }} - run: | - ./earthly.sh +all-arm --MODEL=$MODEL --FLAVOR=$FLAVOR --K3S_VERSION=${{ matrix.k3s_version }} - - name: Push 🔧 - if: startsWith(github.ref, 'refs/tags/') - run: | - docker push $(cat build/IMAGE) - - name: Sign image - if: startsWith(github.ref, 'refs/tags/') - env: - COSIGN_YES: true - run: | - export IMAGE=$(cat build/IMAGE) - docker push "$IMAGE" # Otherwise .RepoDigests will be empty for some reason - cosign sign $(docker image inspect --format='{{index .RepoDigests 0}}' "$IMAGE") - - name: Upload Image - if: startsWith(github.ref, 'refs/tags/') - run: | - curl https://luet.io/install.sh | sudo sh - IMAGE=$(cat build/IMAGE | sed 's/:/-img:/') - sudo tar cvf build.tar build - sudo luet util pack $IMAGE build.tar image.tar - sudo -E docker load -i image.tar - sudo -E docker push "$IMAGE" - sudo rm -rf build/IMAGE build/VERSION - - image_and_iso_arm64_generic: - needs: - - get-matrix - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - flavor: - - "opensuse-leap-arm-generic" - 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: Login to Quay Registry - run: echo ${{ secrets.QUAY_PASSWORD }} | docker login -u ${{ secrets.QUAY_USERNAME }} --password-stdin quay.io - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - name: Build 🔧 - run: | - K3S_LATEST=$(curl -s https://update.k3s.io/v1-release/channels | \ - jq -rc '[ .data[] | select(.type == "channel") | select(.name | test("testing") | not) | .latest ] | unique | .[-1]') - earthly -P +all-arm-generic --FLAVOR=${{ matrix.flavor }} --K3S_VERSION=$K3S_LATEST - sudo mv build release - - name: Push to quay - run: | - IMAGE=$(cat release/IMAGE) - docker push "$IMAGE" - - name: Release - uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') - with: - files: | - release/* diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml deleted file mode 100644 index 23702d26..00000000 --- a/.github/workflows/release.yaml +++ /dev/null @@ -1,68 +0,0 @@ -name: Release - -on: - push: - tags: - - v* -jobs: - get-matrix: - runs-on: ubuntu-latest - outputs: - matrix: ${{ steps.set-matrix.outputs.matrix }} - steps: - - uses: actions/checkout@v3 - - run: | - git fetch --prune --unshallow - - id: set-matrix - run: | - content=`cat ./releases.json` - # the following lines are only required for multi line json - content="${content//'%'/'%25'}" - content="${content//$'\n'/'%0A'}" - content="${content//$'\r'/'%0D'}" - # end of optional handling for multi line json - echo "::set-output name=matrix::{\"include\": $content }" - build: - runs-on: ubuntu-latest - needs: - - get-matrix - permissions: - id-token: write # OIDC support - contents: write - strategy: - fail-fast: false - matrix: ${{fromJson(needs.get-matrix.outputs.matrix)}} - steps: - - uses: actions/checkout@v3 - - run: | - git fetch --prune --unshallow - - name: setup-docker - uses: docker-practice/actions-setup-docker@master - - name: Install Cosign - uses: sigstore/cosign-installer@main - - name: Release space from worker - run: | - sudo rm -rf /usr/local/lib/android # will release about 10 GB if you don't need Android - sudo rm -rf /usr/share/dotnet # will release about 20GB if you don't need .NET - - name: Login to Quay Registry - run: echo ${{ secrets.QUAY_PASSWORD }} | docker login -u ${{ secrets.QUAY_USERNAME }} --password-stdin quay.io - - name: Build 🔧 - if: startsWith(github.ref, 'refs/tags/') - run: | - ./earthly.sh +all --K3S_VERSION=${{ matrix.k3s_version }} --FLAVOR=${{ matrix.flavor }} - sudo mv build release - - name: Push to quay - if: startsWith(github.ref, 'refs/tags/') - env: - COSIGN_YES: true - run: | - IMAGE=$(cat release/IMAGE) - docker push "$IMAGE" - cosign sign $(docker image inspect --format='{{index .RepoDigests 0}}' "$IMAGE") - sudo rm -rf release/IMAGE release/VERSION - - name: Release - uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') - with: - files: | - release/*