Skip to content

Commit ded412a

Browse files
committed
Push a latest-24 image.
1 parent 86975ba commit ded412a

1 file changed

Lines changed: 5 additions & 16 deletions

File tree

.github/workflows/build.yml

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
name: Build and push latest image
22

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

1512
jobs:
1613
build:
@@ -24,15 +21,7 @@ jobs:
2421
id: get-tag
2522
shell: bash
2623
run: |
27-
TAG=""
28-
if [[ "$GITHUB_REF" =~ "main" ]]; then
29-
TAG="latest-24"
30-
elif [[ "$GITHUB_REF" =~ "stable" ]]; then
31-
TAG="stable-24"
32-
else
33-
echo "Invalid Github ref $GITHUB_REF"
34-
exit 1
35-
fi
24+
TAG="latest-24"
3625
echo "Tag is $TAG"
3726
echo "::set-output name=tag::$TAG"
3827
- name: Set up Docker Buildx
@@ -46,7 +35,7 @@ jobs:
4635
uses: docker/build-push-action@v6
4736
with:
4837
context: .
49-
push: false
38+
push: true
5039
tags: p4lang/pi:${{ steps.get-tag.outputs.tag }}
5140
cache-from: type=gha
5241
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)