minor fixes to ci #22
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Docker images | |
on: | |
release: | |
types: [published] | |
# TODO: The run on push should be removed (or commented out) in the future. It is here only for testing purposes | |
# while the deployment is WiP | |
push: | |
branches: | |
- updated_backend_deployment | |
env: | |
REGISTRY: ghcr.io | |
jobs: | |
build-and-push: | |
name: Push Docker image to GHCR | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Log in to GHCR | |
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta-frontend | |
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 | |
with: | |
images: ${{ env.REGISTRY }}/tira-io/tira-frontend | |
- name: Publish tira-frontend image | |
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 | |
with: | |
context: ${{ github.workspace }}/frontend | |
file: ${{ github.workspace }}/frontend/Dockerfile.prod | |
push: true | |
tags: ${{ steps.meta-frontend.outputs.tags }} | |
labels: ${{ steps.meta-frontend.outputs.labels }} | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta-backend | |
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 | |
with: | |
images: ${{ env.REGISTRY }}/tira-io/tira-backend | |
- name: Publish tira-backend image | |
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 | |
with: | |
context: ${{ github.workspace }}/ | |
file: ${{ github.workspace }}/application/Dockerfile.prod | |
push: true | |
tags: ${{ steps.meta-backend.outputs.tags }} | |
labels: ${{ steps.meta-backend.outputs.labels }} |