Skip to content

Commit

Permalink
Merge pull request #5 from benzlokzik/feature/auto-publish-releases
Browse files Browse the repository at this point in the history
Add workflow for publishing Docker container
  • Loading branch information
benzlokzik committed Dec 16, 2023
2 parents 05dd7cf + 3178026 commit 039e873
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/publish-container.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish Docker container

on:
release:
types: [ published ]

jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Check Out Repo
uses: actions/checkout@v2

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

- name: Build and Push Docker Image
uses: docker/build-push-action@v2
with:
push: true
tags: ghcr.io/${{ github.repository }}/myapp:${{ github.ref_name }}

0 comments on commit 039e873

Please sign in to comment.