From f5a7d8344eccfc64a2f7bcf9d9b5cc838cd90f3d Mon Sep 17 00:00:00 2001 From: Thibault Cheneviere Date: Mon, 22 Apr 2024 01:59:02 -0400 Subject: [PATCH 1/2] feat: edited the ci action to be able to push to registry --- .github/workflows/ci.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1e3716c..f008562 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,11 +7,27 @@ on: jobs: docker_publish: runs-on: "ubuntu-latest" + permissions: + contents: read + packages: write steps: - name: Checkout repository uses: actions/checkout@v4 + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + # list of Docker images to use as base name for tags + images: | + ghcr.io/${{ github.repository }} + # generate Docker tags based on the following events/attributes + tags: | + type=semver,pattern={{version}} + type=raw,value=latest + type=sha + - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -31,4 +47,4 @@ jobs: context: . platforms: linux/amd64,linux/arm64 push: true - tags: ghcr.io/${{ github.repository }}:latest + tags: ${{ steps.meta.outputs.tags }} From 9b3e1c4156dc40165aa4ce44f8d9d92105f7b7e9 Mon Sep 17 00:00:00 2001 From: Thibault Cheneviere Date: Mon, 22 Apr 2024 02:02:00 -0400 Subject: [PATCH 2/2] feat: added a cache to the github ci action --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f008562..baebaf4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,3 +48,5 @@ jobs: platforms: linux/amd64,linux/arm64 push: true tags: ${{ steps.meta.outputs.tags }} + cache-from: type=gha + cache-to: type=gha,mode=max