Skip to content

chore(ci): add missing path for package #9

chore(ci): add missing path for package

chore(ci): add missing path for package #9

Workflow file for this run

name: Build & Publish
on:
pull_request:
branches:
- '**'
push:
branches:
- main
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
package: ['backend', 'frontend']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Environment setup
uses: ./.github/workflows/setup
- name: Build
run: |
pnpm --filter ${{ matrix.package }} build
publish:
runs-on: ubuntu-latest
needs: build
timeout-minutes: 15
if: startsWith(github.ref, 'refs/tags/v')
strategy:
matrix:
package:
- name: web-monetization-tools-backend
identifier: backend
path: backend
- name: web-monetization-tools-frontend
identifier: frontend
path: frontend
script_api_url: https://wmtools-backend.interledger-test.dev/
script_frontend_url: https://wmtools.interledger-test.dev/
script_ilpay_url: https://interledgerpay.com/extension/
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker build and push
uses: docker/build-push-action@v6
with:
context: ./
push: true
file: ${{ matrix.package.path }}/Dockerfile
build-args: |
${{ matrix.package.identifier == 'frontend' && format('VITE_SCRIPT_API_URL={0}', matrix.package.script_api_url) || '' }}
${{ matrix.package.identifier == 'frontend' && format('VITE_SCRIPT_FRONTEND_URL={0}', matrix.package.script_frontend_url) || '' }}
${{ matrix.package.identifier == 'frontend' && format('VITE_SCRIPT_ILPAY_URL={0}', matrix.package.script_ilpay_url) || '' }}
tags: ghcr.io/${{ github.repository_owner }}/${{ matrix.package.name }}:${{ github.ref_name }},ghcr.io/${{ github.repository_owner }}/${{ matrix.package.name }}:latest