Skip to content
This repository has been archived by the owner on Oct 20, 2024. It is now read-only.

Commit

Permalink
Build and publish docker image on release
Browse files Browse the repository at this point in the history
  • Loading branch information
hazim-j committed Jan 27, 2024
1 parent e0100b7 commit 26a6a31
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,33 @@
name: Build docker image
name: Build and publish Docker image

on: workflow_dispatch
on:
release:
types: [published]

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Set release version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
username: ${{secrets.DOCKERHUB_USERNAME}}
password: ${{secrets.DOCKERHUB_TOKEN}}

- name: Build and push
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
push: true
tags: stackupwallet/stackup-bundler:latest
tags: |
stackupwallet/stackup-bundler:latest
stackupwallet/stackup-bundler:${{env.RELEASE_VERSION}}

0 comments on commit 26a6a31

Please sign in to comment.