Skip to content

Commit

Permalink
🔨 Add GitHub action to publish
Browse files Browse the repository at this point in the history
  • Loading branch information
michaljanocko committed Nov 12, 2023
1 parent 493e51e commit 581f41e
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Docker

on:
push:
branches:
- "main"
# Publish `v1.2.3` tags as releases.
tags:
- "v*"
workflow_dispatch: ~

jobs:
push_to_registries:
name: Publish to GitHub Packages
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/${{ github.repository }}
- uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 581f41e

Please sign in to comment.