-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (39 loc) · 1.08 KB
/
build-p4c.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
---
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