Skip to content

Workflow file for this run

name: Construct Container
on:
push:
branches:
- main
paths:
- "backend/**"
release:
types:
- published
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Codebase
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: soup-bowl
password: ${{ secrets.CR_PAT }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Build for Edge
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
uses: docker/build-push-action@v5
with:
push: true
tags: ghcr.io/soup-bowl/netscrape:edge
platforms: >
linux/amd64
# linux/arm64
context: "{{defaultContext}}:backend"
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build for Production
if: ${{ github.event_name == 'release' }}
uses: docker/build-push-action@v5
with:
push: true
tags: >
ghcr.io/soup-bowl/netscrape:${{ github.event.release.tag_name }},
ghcr.io/soup-bowl/netscrape:latest
platforms: >
linux/amd64
# linux/arm64
context: "{{defaultContext}}:backend"
cache-from: type=gha
cache-to: type=gha,mode=max