Skip to content

Deploy Images to GHCR #2

Deploy Images to GHCR

Deploy Images to GHCR #2

Workflow file for this run

name: Deploy Images to GHCR
on:
release:
types:
- released
workflow_dispatch:
permissions:
packages: write
contents: read
jobs:
build-docker-image:
runs-on: ubuntu-latest
steps:
- name: 'Checkout repo'
uses: actions/checkout@main
- 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.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ghcr.io/${{ github.repository }}:${{ github.ref_name }}