Skip to content

Docker

Docker #91

Workflow file for this run

name: Docker
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * 1"
jobs:
build:
name: build
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Setup Docker buildx
uses: docker/[email protected]
- name: Log in to Docker Hub
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Log in to the Container registry
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GIT_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@818d4b7b91585d195f67373fd9cb0332e31a7175
with:
images: |
justsky/rubberglue
ghcr.io/${{ github.repository }}
- name: Build and push Docker images
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6, linux/386, linux/ppc64le,linux/s390x
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=${{ secrets.DOCKERHUB_USERNAME }}/rubberglue:buildcache
cache-to: type=registry,ref=${{ secrets.DOCKERHUB_USERNAME }}/rubberglue:buildcache,mode=max