Skip to content

v0.3.13

v0.3.13 #98

Workflow file for this run

name: Docker Push
on:
release:
types:
- created
push:
branches:
- master
jobs:
docker:
permissions:
contents: read
packages: write
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
mcuadros/ofelia
# ghcr.io/${{ github.repository }}
flavor: |
latest=false
tags: |
type=raw,value=development,enable=${{ github.event_name != 'release' }}
type=raw,value=latest,enable=${{ github.event_name == 'release' }}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha,enable=true,priority=100,prefix=,suffix=,format=short
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: mcuadros
# Replace with below once @mcuadros adds the DOCKER_USERNAME secret
# username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build the Docker image and push
uses: docker/build-push-action@v6
with:
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
GIT_REF=${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=min