You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
docuseal/.github/workflows/docker.yml

60 lines
1.3 KiB

name: Build Docker Images
on:
pull_request:
paths:
- 'Dockerfile'
- 'Gemfile'
- 'Gemfile.lock'
- 'yarn.lock'
- 'package.json'
- '.github/workflows/docker.yml'
push:
tags:
- "*.*.*"
jobs:
build:
runs-on: ubuntu-24.04-arm
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: wabolabs/wabosign
tags: |
type=ref,event=pr
type=semver,pattern={{version}},event=tag
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Create .version file
if: github.ref_type == 'tag'
run: echo ${{ github.ref_name }} > .version
- name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v6
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}