1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-19 12:59:36 +02:00

Create docker-publish.yml

This commit is contained in:
Sean Morley 2024-04-11 10:52:58 -04:00 committed by GitHub
parent a10f7485e0
commit 70a5d703f8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

31
.github/workflows/docker-publish.yml vendored Normal file
View file

@ -0,0 +1,31 @@
name: Upload Docker image to GHCR
on:
release:
types: [published]
env:
IMAGE_NAME: "adventurelog"
jobs:
upload:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.ACESS_TOKEN }}
- name: Build Docker image
run: docker build -t $IMAGE_NAME:${{ github.event.release.tag_name }} .
- name: Tag Docker image
run: docker tag $IMAGE_NAME:${{ github.event.release.tag_name }} ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME:${{ github.event.release.tag_name }}
- name: Push Docker image to GHCR
run: docker push ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME:${{ github.event.release.tag_name }}