Skip to content

πŸš€ Deploy backend-node #204

πŸš€ Deploy backend-node

πŸš€ Deploy backend-node #204

name: πŸš€ Deploy backend-node
on:
workflow_run:
workflows:
- "Backend node CI"
branches:
- main
types: [completed]
workflow_dispatch:
jobs:
docker:
runs-on: ubuntu-latest
permissions:
packages: write
concurrency:
group: build_push_docker_backend_node_prod
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push production image
uses: docker/build-push-action@v6
with:
context: backend-node
file: backend-node/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
no-cache: true
build-args: |
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
GITHUB_SHA=${{ github.sha }}
tags: |
ghcr.io/flathub-infra/backend-node:${{ github.sha }}
ghcr.io/flathub-infra/backend-node:latest
labels: |
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.source=ssh://[email protected]:${{ github.repository }}.git
org.opencontainers.image.url=https://github.com/${{ github.repository }}