build-p4c #258
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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 |