Skip to content

try to clean up a gob of the CI #9

try to clean up a gob of the CI

try to clean up a gob of the CI #9

on:
push:
branches:
- main
env:
FS_IMAGE: ghcr.io/${{ github.repository }}
jobs:
release-docker:
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
strategy:
matrix:
platform:
# - { earthly: linux/arm64, suffix: linux-arm64 }
- { earthly: linux/amd64, suffix: linux-amd64 }
steps:
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v1
with:
image: tonistiigi/binfmt:latest
platforms: all
if: matrix.platform == 'linux/arm64'
- uses: actions/checkout@v3
with:
# need to get everything so that 'git describe' works
fetch-depth: 0
- uses: wistia/[email protected]
- uses: earthly/actions-setup@v1
with: { version: "v${{ env.EARTHLY_TOOL_VERSION }}" }
- name: extract sha
run: |
echo "GIT_COMMIT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "GIT_TAG=$(git describe)" >> $GITHUB_ENV
- name: login to registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push the Docker image
run: |
./earthly \
--platform ${{ matrix.platform.earthly }} \
--push \
+docker \
--GIT_TAG=${{ env.GIT_TAG }} \
--GIT_COMMIT=${{ env.GIT_COMMIT }} \
--IMAGE_NAME=${{ env.FS_IMAGE }}:${{ env.GIT_TAG }}
release-multiarch:
runs-on: ubuntu-22.04
needs:
- release-docker
permissions:
packages: write
steps:
- name: extract sha
run: |
echo "GIT_COMMIT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "GIT_TAG=$(git describe)" >> $GITHUB_ENV
- name: login to registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: int128/docker-manifest-create-action@v1
with:
tags: ghcr.io/${{ github.repository_owner }}/kubechecks:${{ env.GIT_TAG }}
suffixes: |
-linux-amd64
# -linux-arm64
release-helm:
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- name: checkout the source code
uses: actions/checkout@v3
- uses: wistia/[email protected]
- uses: earthly/actions-setup@v1
with: { version: "v${{ env.EARTHLY_TOOL_VERSION }}" }
- name: Build and push the Docker image
run: |
earthly \
--push \
+release-helm \
--repo_owner ${{ github.repository_owner }} \
--token ${{ secrets.GITHUB_TOKEN }}