Skip to content

Instantly share code, notes, and snippets.

@tuna2134
Last active June 30, 2024 01:17
Show Gist options
  • Save tuna2134/10e8599e55ae646f0c04bd07106f8159 to your computer and use it in GitHub Desktop.
Save tuna2134/10e8599e55ae646f0c04bd07106f8159 to your computer and use it in GitHub Desktop.
name: Push to github container register
on:
release:
types: [created]
jobs:
push-docker:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- 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.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
ghcr.io/${{ github.repository }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment