Skip to content

build-p4c

build-p4c #251

Workflow file for this run

---
name: 'build-p4c'
on:
push:
branches: [main]
paths:
- 'build/p4c/**'
pull_request:
branches: [main]
paths:
- 'build/p4c/**'
schedule:
- cron: '1 1 * * *' # Run every day at 01:01 AM (UTC)
workflow_dispatch:
concurrency:
# if workflow for PR or push is already running stop it, and start new one
group: build-p4c-${{ github.ref }}
cancel-in-progress: true
jobs:
build_containers:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: DPDK image build and push
if: github.event_name != 'pull_request'
run: |
build/p4c/build.sh --push
- name: DPDK image build (TODO add export later)
if: github.event_name == 'pull_request'
run: |
build/p4c/build.sh