Skip to content

Initial commit

Initial commit #1

name: Build mcrouter
on:
push:
branches:
- main
paths-ignore:
- LICENSE
- README.md
- .github/dependabot.yml
pull_request:
paths-ignore:
- LICENSE
- README.md
- .github/dependabot.yml
jobs:
build_mcrouter_debian_bookworm:
name: Build Debian Bookworm mcrouter package
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: infra
- name: Fetch mcrouter
run: ./infra/fetch.sh
- name: Build and test mcrouter
run: |
docker build -f ./infra/Dockerfile-debian --target builder -t buildenv .
docker run --rm --name buildenv -v $(pwd):/build -w /build buildenv ./infra/build-and-test.sh
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: mcrouter-debian-bookworm
path: fbcode-scratch/build/mcrouter/mcrouter.deb
push_mcrouter_debian_bookworm:
name: Push Debian Bookworm mcrouter image
needs: build_mcrouter_debian_bookworm
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download mcrouter package
uses: actions/download-artifact@v4
with:
name: mcrouter-debian-bookworm
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ github.token }}
- name: Populate docker metadata
id: docker-meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/mszabo-wikia/mcrouter-debian-bookworm
tags:
type=sha,prefix={{date YYYYMMDD}}-
- name: Build and push mcrouter image
id: push
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile-debian
push: ${{ github.event_name == 'push') }}

Check failure on line 73 in .github/workflows/build-mcrouter.yml

View workflow run for this annotation

GitHub Actions / Build mcrouter

Invalid workflow file

The workflow is not valid. .github/workflows/build-mcrouter.yml (Line: 73, Col: 17): Unexpected symbol: ')'. Located at position 28 within expression: github.event_name == 'push') .github/workflows/build-mcrouter.yml (Line: 79, Col: 13): Unexpected symbol: ')'. Located at position 28 within expression: github.event_name == 'push')
target: base
tags: ${{ steps.docker-meta.outputs.tags }}
labels: ${{ steps.docker-meta.outputs.labels }}
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v2
if: ${{ github.event_name == 'push') }}
with:
subject-name: ghcr.io/mszabo-wikia/mcrouter-debian-bookworm
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true