19
19
permissions :
20
20
packages : write
21
21
contents : read
22
- runs-on : ubuntu-20 .04
22
+ runs-on : ubuntu-24 .04
23
23
strategy :
24
24
fail-fast : false
25
25
matrix :
30
30
31
31
steps :
32
32
- name : Check out code
33
- uses : actions/checkout@v3.2.0
33
+ uses : actions/checkout@v4
34
34
with :
35
35
fetch-depth : 0
36
36
# Check https://github.com/livepeer/go-livepeer/pull/1891
43
43
- name : Set up Docker Buildx
44
44
uses : docker/setup-buildx-action@v2
45
45
46
- - name : Login to DockerHub
47
- uses : docker/login-action@v2
48
- if :
49
- ${{ github.event_name == 'push' ||
50
- github.event.pull_request.head.repo.full_name == github.repository }}
51
- with :
52
- username : ${{ secrets.CI_DOCKERHUB_USERNAME }}
53
- password : ${{ secrets.CI_DOCKERHUB_TOKEN }}
54
-
55
- # - name: Log in to the Container registry
56
- # uses: docker/login-action@v2
57
- # with:
58
- # registry: ghcr.io
59
- # username: ${{ github.actor }}
60
- # password: ${{ github.token }}
61
-
62
46
- name : Extract metadata (tags, labels) for Docker
63
47
id : meta
64
- uses : docker/metadata-action@v4
48
+ uses : docker/metadata-action@v5
65
49
with :
66
50
images : |
67
51
${{ matrix.build.image }}
@@ -78,20 +62,32 @@ jobs:
78
62
type=raw,value=${{ github.event.pull_request.head.ref }}
79
63
type=raw,value=stable,enable=${{ startsWith(github.event.ref, 'refs/tags/v') }}
80
64
65
+ - name : Login to DockerHub
66
+ uses : docker/login-action@v2
67
+ if :
68
+ ${{ github.event_name == 'push' ||
69
+ github.event.pull_request.head.repo.full_name == github.repository }}
70
+ with :
71
+ username : ${{ secrets.CI_DOCKERHUB_USERNAME }}
72
+ password : ${{ secrets.CI_DOCKERHUB_TOKEN }}
73
+
81
74
- name : Build and push livepeer docker image
82
- uses : docker/build-push-action@v3
75
+ uses : docker/build-push-action@v6
83
76
with :
84
77
build-args : |
85
78
VERSION=${{ (github.ref_type == 'tag' && github.ref_name) || (github.event.pull_request.head.sha || github.sha) }}
86
79
GITHUB_SHA=${{ (github.event.pull_request.head.sha || github.sha) }}
87
80
context : .
88
81
platforms : linux/amd64
82
+ provenance : mode=max
83
+ sbom : true
89
84
push :
90
85
${{ github.event_name == 'push' ||
91
86
github.event.pull_request.head.repo.full_name == github.repository
92
87
}}
93
- tags : ${{ steps.meta.outputs.tags }}
94
88
file : ${{ matrix.build.path }}/Dockerfile
89
+ tags : ${{ steps.meta.outputs.tags }}
90
+ annotations : ${{ steps.meta.outputs.annotations }}
95
91
labels : ${{ steps.meta.outputs.labels }}
96
92
cache-from : type=gha
97
93
cache-to : type=gha,mode=max
0 commit comments