From cf0c262bad7f090ba0435343d032912d7f5e9e63 Mon Sep 17 00:00:00 2001 From: nroulon Date: Fri, 3 May 2024 14:19:16 +0200 Subject: [PATCH] feat: add a job for build a docker image for linux/amd64 and linux/arm64 --- .dockerignore | 1 + .../workflows/publish_docker_packages.yaml | 35 +++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 .github/workflows/publish_docker_packages.yaml diff --git a/.dockerignore b/.dockerignore index 466fcba..7e525d3 100644 --- a/.dockerignore +++ b/.dockerignore @@ -12,3 +12,4 @@ install-aki.py sample tests tox.ini +.github diff --git a/.github/workflows/publish_docker_packages.yaml b/.github/workflows/publish_docker_packages.yaml new file mode 100644 index 0000000..11537f9 --- /dev/null +++ b/.github/workflows/publish_docker_packages.yaml @@ -0,0 +1,35 @@ +name: Publish docker packages on GitHub + +on: + push: + tags: + - '*' + +jobs: + publish: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + platforms: linux/amd64 + push: true + tags: | + ghcr.io/4sh/aki:latest + ghcr.io/4sh/aki:${{ github.ref_name }}