From 07ad1d0221b47f495f2682b6bcf68fac2302bca8 Mon Sep 17 00:00:00 2001 From: indykoning <15870933+indykoning@users.noreply.github.com> Date: Tue, 6 Feb 2024 17:44:48 +0100 Subject: [PATCH] Create docker push workflow Signed-off-by: indykoning <15870933+indykoning@users.noreply.github.com> --- .github/workflows/push-docker-container.yml | 57 +++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/push-docker-container.yml diff --git a/.github/workflows/push-docker-container.yml b/.github/workflows/push-docker-container.yml new file mode 100644 index 00000000000..fd250110c86 --- /dev/null +++ b/.github/workflows/push-docker-container.yml @@ -0,0 +1,57 @@ +name: "Push Docker Container" + +on: + workflow_dispatch: + inputs: + tag: + description: 'Additional tag to push' + required: false + push: + branches: + - 'main' + tags: + - '*' + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v3 + - + name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: | + ghcr.io/maybe-finance/maybe + tags: | + type=ref,event=branch + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + type=sha + type=raw,value=${{ inputs.tag }},enable=${{ inputs.tag != '' }} + - + name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - + name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - + name: Build and push + uses: docker/build-push-action@v4 + with: + context: . + platforms: linux/amd64,linux/arm64 + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }}