Skip to content

Build Docker images on Release #12

Build Docker images on Release

Build Docker images on Release #12

Workflow file for this run

name: Build Docker images on Release
on:
release:
types: [published]
jobs:
build-push-docker-images:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
flavor: |
latest=false
tags: |
type=semver,pattern={{version}}
type=pep440,pattern={{version}}
images: |
hivacruz/moviestills
ghcr.io/${{ github.repository }}
- name: Build and push Docker images
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# Uploading the README.md is not a core feature of docker/build-push-action yet
- name: push README to Dockerhub
uses: christian-korneck/update-container-description-action@v1
env:
DOCKER_USER: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASS: ${{ secrets.DOCKERHUB_PASS }}
with:
destination_container_repo: hivacruz/moviestills
provider: dockerhub
short_description: "Docker image for moviestills, a small CLI app to download movie snapshots."
readme_file: 'README.md'