mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-08-07 22:25:19 +02:00
Release workflows
This commit is contained in:
parent
143f84e910
commit
967a125b2f
5 changed files with 66 additions and 4 deletions
31
.github/workflows/backend-release.yml
vendored
Normal file
31
.github/workflows/backend-release.yml
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
name: Publish backend release
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
env:
|
||||
IMAGE_NAME: "adventurelog-backend"
|
||||
|
||||
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 }} ./backend
|
||||
|
||||
- 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 }}
|
Loading…
Add table
Add a link
Reference in a new issue