Skip to content

Merge pull request #56 from bernardoforcillo/dev #15

Merge pull request #56 from bernardoforcillo/dev

Merge pull request #56 from bernardoforcillo/dev #15

Workflow file for this run

name: 'build containers and push to dockerhub'
on:
push:
branches:
- 'main'
tags:
- 'v*'
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
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:
images: |
bernardoforcillo/bernardoforcillo-com
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
labels: |
org.opencontainers.image.title=bernardoforcillo-com
org.opencontainers.image.description=This container image contains the Bernardo Forcillo's personal website. See https://bernardoforcillo.com/
org.opencontainers.image.vendor=Bernardo Forcillo
org.opencontainers.image.licenses=AGPL-3.0-or-later
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}