File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Build and push latest image
22
33on :
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
1512jobs :
1613 build :
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
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
You can’t perform that action at this time.
0 commit comments