Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 4 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
name: Build and push latest image

on:
pull_request:
branches:
- main
push:
branches:
- main
- stable
schedule:
# We run it every 4 hours, starting at 02:15.
# Note that this will only update the 'latest' tag (not the 'stable' tag).
# Ideally, we would update the image every time the base image
# (p4lang/third-party) is updated, but we deem this good enough.
- cron: '15 2-23/4 * * *' # "At minute 15 past every 4th hour from 2 through 23."

jobs:
build:
Expand All @@ -24,15 +21,7 @@ jobs:
id: get-tag
shell: bash
run: |
TAG=""
if [[ "$GITHUB_REF" =~ "main" ]]; then
TAG="latest"
elif [[ "$GITHUB_REF" =~ "stable" ]]; then
TAG="stable"
else
echo "Invalid Github ref $GITHUB_REF"
exit 1
fi
TAG="latest-24"
echo "Tag is $TAG"
echo "::set-output name=tag::$TAG"
- name: Set up Docker Buildx
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

# Antonin Bas (antonin@barefootnetworks.com)

FROM p4lang/third-party:latest
FROM p4lang/third-party:latest-24
LABEL maintainer="P4 Developers <p4-dev@lists.p4.org>"
LABEL description="This Docker image includes only the most widely-used PI \
artifacts: PI core and P4Runtime. It does not include the Thrift-based PI \
Expand All @@ -32,7 +32,7 @@
# removed from the image.
ARG IMAGE_TYPE=build

ENV PI_DEPS automake \

Check warning on line 35 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
build-essential \
g++ \
libboost-dev \
Expand All @@ -40,8 +40,8 @@
libboost-thread-dev \
libtool \
pkg-config
ENV PI_RUNTIME_DEPS libboost-system1.71.0 \
libboost-thread1.71.0 \
ENV PI_RUNTIME_DEPS libboost-system1.74.0 \

Check warning on line 43 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
libboost-thread1.74.0 \
python3 \
python-is-python3

Expand Down
Loading