Skip to content

Release

Release #6

Workflow file for this run

name: Build and Push docker images
on:
release:
types: [published]
jobs:
build-and-push-frontend:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: frontend
- name: Login to GitHub Container Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/[email protected]
with:
context: .
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/trainstatus-frontend:latest
ghcr.io/${{ github.repository_owner }}/trainstatus-frontend:${{ github.event.release.tag_name }}
build-and-push-backend:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: backend
- name: Login to GitHub Container Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/[email protected]
with:
context: .
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/trainstatus-backend:latest
ghcr.io/${{ github.repository_owner }}/trainstatus-backend:${{ github.event.release.tag_name }}