mirror of
https://github.com/kairos-io/provider-kairos.git
synced 2025-05-11 18:05:55 +00:00
Remove image building pipelines (#481)
Building of the artifacts was moved to the kairos repo, so these aren't needed any longer. The arm one is problematic because it has been pushing to "latest" successfully, so what is on latest and what is on the release where built differently. see https://github.com/kairos-io/provider-kairos/actions/runs/6407762500/job/17395278258#step:10:82 and `docker pull quay.io/kairos/kairos-opensuse-leap-arm-rpi@sha256:431839e2b8a331180abbd975c1d89717a7b20d004a807b159ac8bc5c3935651b` fixes #1884
This commit is contained in:
parent
c08f787fa4
commit
fab071e5bf
.github/workflows
163
.github/workflows/image-arm.yaml
vendored
163
.github/workflows/image-arm.yaml
vendored
@ -1,163 +0,0 @@
|
||||
name: 'Test arm build'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
|
||||
concurrency:
|
||||
group: arm-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.repository }}
|
||||
cancel-in-progress: true
|
||||
|
||||
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=`curl https://raw.githubusercontent.com/kairos-io/kairos/master/.github/flavors-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:
|
||||
needs:
|
||||
- get-matrix
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
id-token: write # OIDC support
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix: ${{fromJson(needs.get-matrix.outputs.matrix)}}
|
||||
steps:
|
||||
- name: Release space from worker
|
||||
run: |
|
||||
echo "Listing top largest packages"
|
||||
pkgs=$(dpkg-query -Wf '${Installed-Size}\t${Package}\t${Status}\n' | awk '$NF == "installed"{print $1 "\t" $2}' | sort -nr)
|
||||
head -n 30 <<< "${pkgs}"
|
||||
echo
|
||||
df -h
|
||||
echo
|
||||
sudo apt-get remove -y '^llvm-.*|^libllvm.*' || true
|
||||
sudo apt-get remove --auto-remove android-sdk-platform-tools || true
|
||||
sudo apt-get purge --auto-remove android-sdk-platform-tools || true
|
||||
sudo rm -rf /usr/local/lib/android
|
||||
sudo apt-get remove -y '^dotnet-.*|^aspnetcore-.*' || true
|
||||
sudo rm -rf /usr/share/dotnet
|
||||
sudo apt-get remove -y '^mono-.*' || true
|
||||
sudo apt-get remove -y '^ghc-.*' || true
|
||||
sudo apt-get remove -y '.*jdk.*|.*jre.*' || true
|
||||
sudo apt-get remove -y 'php.*' || true
|
||||
sudo apt-get remove -y hhvm powershell firefox monodoc-manual msbuild || true
|
||||
sudo apt-get remove -y '^google-.*' || true
|
||||
sudo apt-get remove -y azure-cli || true
|
||||
sudo apt-get remove -y '^mongo.*-.*|^postgresql-.*|^mysql-.*|^mssql-.*' || true
|
||||
sudo apt-get remove -y '^gfortran-.*' || true
|
||||
sudo apt-get autoremove -y
|
||||
sudo apt-get clean
|
||||
echo
|
||||
echo "Listing top largest packages"
|
||||
pkgs=$(dpkg-query -Wf '${Installed-Size}\t${Package}\t${Status}\n' | awk '$NF == "installed"{print $1 "\t" $2}' | sort -nr)
|
||||
head -n 30 <<< "${pkgs}"
|
||||
echo
|
||||
sudo rm -rfv build || true
|
||||
sudo rm -rf /usr/local/lib/android || true # will release about 10 GB if you don't need Android
|
||||
sudo rm -rf /usr/share/dotnet || true # will release about 20GB if you don't need .NET
|
||||
df -h
|
||||
- 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: Login to Quay Registry
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
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 🔧
|
||||
env:
|
||||
FLAVOR: ${{ matrix.flavor }}
|
||||
MODEL: ${{ matrix.model }}
|
||||
IMAGE: "quay.io/kairos/kairos-${{ matrix.flavor }}"
|
||||
TAG: "latest"
|
||||
run: |
|
||||
./earthly.sh +all-arm --IMAGE_NAME=kairos-$FLAVOR-$TAG.img --IMAGE="$IMAGE:$TAG" --MODEL=$MODEL --FLAVOR=$FLAVOR
|
||||
- name: Push to quay
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
env:
|
||||
COSIGN_YES: true
|
||||
IMAGE: "quay.io/kairos/kairos-${{ matrix.flavor }}"
|
||||
TAG: "latest"
|
||||
run: |
|
||||
docker push "$IMAGE:$TAG" # Otherwise .RepoDigests will be empty for some reason
|
||||
cosign sign $(docker image inspect --format='{{index .RepoDigests 0}}' "$IMAGE:$TAG")
|
||||
- name: Upload results
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ matrix.flavor }}-image
|
||||
path: build
|
||||
if-no-files-found: error
|
||||
image_and_iso:
|
||||
needs:
|
||||
- get-matrix
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
flavor:
|
||||
- "opensuse-leap-arm-generic"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
- name: Install earthly
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
uses: Luet-lab/luet-install-action@v1
|
||||
with:
|
||||
repository: quay.io/kairos/packages
|
||||
packages: utils/earthly
|
||||
- name: Set up QEMU
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
uses: docker/setup-qemu-action@master
|
||||
with:
|
||||
platforms: all
|
||||
- name: Login to Quay Registry
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
run: echo ${{ secrets.QUAY_PASSWORD }} | docker login -u ${{ secrets.QUAY_USERNAME }} --password-stdin quay.io
|
||||
- name: Set up Docker Buildx
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@master
|
||||
- name: Build 🔧
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
env:
|
||||
IMAGE: "quay.io/kairos/kairos-${{ matrix.flavor }}"
|
||||
TAG: "master"
|
||||
run: |
|
||||
earthly -P +all-arm-generic --IMAGE="$IMAGE:$TAG" --FLAVOR=${{ matrix.flavor }} --CORE_VERSION=master
|
||||
- name: Push to quay
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
env:
|
||||
IMAGE: "quay.io/kairos/kairos-${{ matrix.flavor }}"
|
||||
TAG: "master"
|
||||
run: |
|
||||
docker push "$IMAGE:$TAG"
|
||||
- uses: actions/upload-artifact@v3
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
with:
|
||||
name: kairos-${{ matrix.flavor }}-arm64.iso.zip
|
||||
path: |
|
||||
build/*.iso
|
||||
build/*.sha256
|
67
.github/workflows/image.yaml
vendored
67
.github/workflows/image.yaml
vendored
@ -1,67 +0,0 @@
|
||||
name: Build image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.repository }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
get-matrix:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- run: |
|
||||
git fetch --prune --unshallow
|
||||
sudo apt update && sudo apt install -y jq
|
||||
- id: set-matrix
|
||||
run: |
|
||||
content=`curl https://raw.githubusercontent.com/kairos-io/kairos/master/.github/flavors.json | jq 'map(select(.frameworkonly != "true"))'`
|
||||
# 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:
|
||||
needs:
|
||||
- get-matrix
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
id-token: write # OIDC support
|
||||
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: 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: Install Cosign
|
||||
uses: sigstore/cosign-installer@main
|
||||
- name: Login to Quay Registry
|
||||
run: echo ${{ secrets.QUAY_PASSWORD }} | docker login -u ${{ secrets.QUAY_USERNAME }} --password-stdin quay.io
|
||||
- name: Build main 🔧
|
||||
env:
|
||||
FLAVOR: ${{ matrix.flavor }}
|
||||
IMAGE: quay.io/kairos/kairos-${{ matrix.flavor }}:latest
|
||||
run: |
|
||||
./earthly.sh +all --IMAGE=$IMAGE --FLAVOR=$FLAVOR
|
||||
- name: Push to quay
|
||||
env:
|
||||
COSIGN_YES: true
|
||||
IMAGE: "quay.io/kairos/kairos-${{ matrix.flavor }}"
|
||||
TAG: "latest"
|
||||
run: |
|
||||
docker push "$IMAGE:$TAG"
|
||||
cosign sign $(docker image inspect --format='{{index .RepoDigests 0}}' "$IMAGE:$TAG")
|
Loading…
Reference in New Issue
Block a user