mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-08-04 12:45:17 +02:00
Create frontend-latest.yml
This commit is contained in:
parent
adcf8a7da4
commit
843f3d7eb4
1 changed files with 34 additions and 0 deletions
34
.github/workflows/frontend-latest.yml
vendored
Normal file
34
.github/workflows/frontend-latest.yml
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
name: Upload Docker image to GHCR
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'frontend/**'
|
||||
|
||||
env:
|
||||
IMAGE_NAME: "adventurelog-frontend"
|
||||
|
||||
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.ACCESS_TOKEN }}
|
||||
|
||||
- name: Build Docker image
|
||||
run: docker build -t $IMAGE_NAME:latest ./frontend
|
||||
|
||||
- name: Tag Docker image
|
||||
run: docker tag $IMAGE_NAME:latest ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME:latest
|
||||
|
||||
- name: Push Docker image to GHCR
|
||||
run: docker push ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME:latest
|
Loading…
Add table
Add a link
Reference in a new issue