Skip to content

Publish Container Image #1

Publish Container Image

Publish Container Image #1

name: Publish Container Image
on:
# Only trigger manually, or as a monthly rebuild - at 02:30 on first of month
# This will only update the 'latest' tag.
workflow_dispatch:
schedule:
- cron: '30 02 01 * *'
jobs:
push_to_registry:
name: Build and Push Container
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Get the Tag Version
id: get_version
run: echo ${{ github.ref_name }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set Up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push to Container Registries
uses: docker/build-push-action@v6
with:
platforms: |
linux/386
linux/amd64
linux/arm/v6
linux/arm/v7
linux/arm64/v8
push: true
tags: |
tomswartz07/slack-adventofcodeleaderboard:latest
tomswartz07/slack-adventofcodeleaderboard:${{github.ref_name}}
ghcr.io/tomswartz07/slack-adventofcodeleaderboard:latest
ghcr.io/tomswartz07/slack-adventofcodeleaderboard:${{github.ref_name}}