Skip to content

Commit

Permalink
ci: add workflow to publish on ghcr on new tag
Browse files Browse the repository at this point in the history
  • Loading branch information
hbollon committed Oct 26, 2023
1 parent 4cc4ee4 commit e6cd67c
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build a Docker image and publish it to GHCR

on:
push:
tags:
- '*'

jobs:
build-and-push:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: ghcr.io/${{ github.repository }}:${{ github.ref_name }}

0 comments on commit e6cd67c

Please sign in to comment.