62 lines
1.9 KiB
YAML
62 lines
1.9 KiB
YAML
# GitHub Action workflow to publish the docker image on
|
|
# https://hub.docker.com/r/niccokunzmann/mastofeed/
|
|
#
|
|
# Find documentation here:
|
|
# https://docs.github.com/en/actions/publishing-packages/publishing-docker-images
|
|
|
|
name: build and publish the Docker image
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
tags:
|
|
- '*'
|
|
|
|
jobs:
|
|
|
|
# steps:
|
|
# - uses: actions/checkout@v3
|
|
# - name: Build the Docker image
|
|
# run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)
|
|
|
|
push_to_registry:
|
|
name: Push Docker image to Docker Hub
|
|
runs-on: ubuntu-latest
|
|
# This environment stores the DOCKERHUB_USERNAME and DOCKERHUB_TOKEN
|
|
# see https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment
|
|
environment:
|
|
name: dockerhub
|
|
url: https://hub.docker.com/r/niccokunzmann/mastofeed
|
|
steps:
|
|
- name: Check out the repo
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v2
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
- name: Log in to Docker Hub
|
|
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Extract metadata (tags, labels) for Docker
|
|
id: meta
|
|
uses: docker/metadata-action@v4
|
|
with:
|
|
images: niccokunzmann/open-web-calendar
|
|
|
|
- name: Build and push Docker image
|
|
uses: docker/build-push-action@v4
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
# architectures: https://hub.docker.com/_/node/tags?page=1&name=20-alpine
|
|
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7,linux/arm/v6
|
|
labels: ${{ steps.meta.outputs.labels }}
|