Skip to content

Merge pull request #18 from jcostom/dependabot/github_actions/actions… #78

Merge pull request #18 from jcostom/dependabot/github_actions/actions…

Merge pull request #18 from jcostom/dependabot/github_actions/actions… #78

Workflow file for this run

name: build docker image
on:
push:
branches:
- 'main'
- 'dev'
tags:
- '*.*'
- '*.*.*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: all
- name: Docker Setup Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: GHCR Login
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker Meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/${{ github.repository }}
tags: |
type=raw,value=latest,enable=${{ endsWith(GitHub.ref, 'main') }}
type=raw,value=dev,enable=${{ endsWith(GitHub.ref, 'dev') }}
type=pep440,pattern={{version}}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}