Skip to content

Commit

Permalink
🤖 Build framework images on self-hosted during release (#1241)
Browse files Browse the repository at this point in the history
Signed-off-by: mudler <[email protected]>
  • Loading branch information
mudler committed Apr 3, 2023
1 parent c433322 commit 59f9035
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
echo "::set-output name=matrix::{\"include\": $content }"
build-framework:
runs-on: ubuntu-latest
runs-on: self-hosted
needs:
- get-matrix
permissions:
Expand All @@ -37,20 +37,32 @@ jobs:
- 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
- uses: earthly/actions-setup@2181cb2b4a133a5b0353fb2a6e87f88df7419025
- name: Install earthly
uses: Luet-lab/luet-install-action@v1
with:
version: "latest"
repository: quay.io/kairos/packages
packages: utils/earthly
- name: Login to Quay Registry
run: echo ${{ secrets.QUAY_PASSWORD }} | docker login -u ${{ secrets.QUAY_USERNAME }} --password-stdin quay.io
- name: Build 🔧
env:
FLAVOR: ${{ matrix.flavor }}
IMAGE: quay.io/kairos/framework
run: |
# Configure earthly to use the docker mirror in CI
# https://docs.earthly.dev/ci-integration/pull-through-cache#configuring-earthly-to-use-the-cache
mkdir -p ~/.earthly/
cat << EOF > ~/.earthly/config.yml
global:
buildkit_additional_config: |
[registry."docker.io"]
mirrors = ["registry.docker-mirror.svc.cluster.local:5000"]
[registry."registry.docker-mirror.svc.cluster.local:5000"]
insecure = true
http = true
EOF
export TAG=${GITHUB_REF##*/}
earthly --push +build-framework-image --FLAVOR=${FLAVOR}
- name: Push to quay
Expand Down

0 comments on commit 59f9035

Please sign in to comment.