File tree 9 files changed +56
-32
lines changed
9 files changed +56
-32
lines changed Original file line number Diff line number Diff line change 4
4
5
5
env :
6
6
REGISTRY : ghcr.io
7
- IMAGE_NAME : ${{ github.repository }}
8
7
9
8
jobs :
10
9
build :
@@ -44,13 +43,17 @@ jobs:
44
43
with :
45
44
images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
46
45
46
+ - id : lower-repo
47
+ run : |
48
+ echo "IMAGE_NAME=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
49
+
47
50
- name : Build and push Docker image
48
51
id : build-and-push
49
52
uses : docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
50
53
with :
51
54
context : .
52
55
push : ${{ github.event_name != 'pull_request' }}
53
- tags : ghcr.io/${{ github.repository }}:latest,ghcr.io/${{ github.repository }}:daily
56
+ tags : ghcr.io/${{ env.IMAGE_NAME }}:latest,ghcr.io/${{ env.IMAGE_NAME }}:daily
54
57
labels : ${{ steps.meta.outputs.labels }}
55
58
cache-from : type=gha
56
59
cache-to : type=gha,mode=max
60
63
env :
61
64
DIGEST : ${{ steps.build-and-push.outputs.digest }}
62
65
run : |
63
- echo "ghcr.io/${{ github.repository }}:daily" | xargs -I {} cosign sign --yes {}@${DIGEST}
64
- echo "ghcr.io/${{ github.repository }}:latest" | xargs -I {} cosign sign --yes {}@${DIGEST}
66
+ echo "ghcr.io/${{ env.IMAGE_NAME }}:daily" | xargs -I {} cosign sign --yes {}@${DIGEST}
67
+ echo "ghcr.io/${{ env.IMAGE_NAME }}:latest" | xargs -I {} cosign sign --yes {}@${DIGEST}
Original file line number Diff line number Diff line change 4
4
5
5
env :
6
6
REGISTRY : ghcr.io
7
- IMAGE_NAME : ${{ github.repository }}
8
7
9
8
jobs :
10
9
build :
@@ -40,12 +39,16 @@ jobs:
40
39
with :
41
40
images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
42
41
42
+ - id : lower-repo
43
+ run : |
44
+ echo "IMAGE_NAME=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
45
+
43
46
- name : Build and push Docker image
44
47
id : build-and-push
45
48
uses : docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
46
49
with :
47
50
push : true
48
- tags : ghcr.io/${{ github.repository }}:static
51
+ tags : ghcr.io/${{ env.IMAGE_NAME }}:static
49
52
context : .
50
53
file : Dockerfile.static
51
54
54
57
env :
55
58
DIGEST : ${{ steps.build-and-push.outputs.digest }}
56
59
run : |
57
- echo "ghcr.io/${{ github.repository }}:static" | xargs -I {} cosign sign --yes {}@${DIGEST}
60
+ echo "ghcr.io/${{ env.IMAGE_NAME }}:static" | xargs -I {} cosign sign --yes {}@${DIGEST}
Original file line number Diff line number Diff line change 4
4
5
5
env :
6
6
REGISTRY : ghcr.io
7
- IMAGE_NAME : ${{ github.repository }}
8
7
9
8
jobs :
10
9
build :
@@ -40,12 +39,16 @@ jobs:
40
39
with :
41
40
images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
42
41
42
+ - id : lower-repo
43
+ run : |
44
+ echo "IMAGE_NAME=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
45
+
43
46
- name : Build and push Docker image
44
47
id : build-and-push
45
48
uses : docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
46
49
with :
47
50
push : true
48
- tags : ghcr.io/${{ github.repository }}:static
51
+ tags : ghcr.io/${{ env.IMAGE_NAME }}:static
49
52
context : .
50
53
file : Dockerfile.static
51
54
54
57
env :
55
58
DIGEST : ${{ steps.build-and-push.outputs.digest }}
56
59
run : |
57
- echo "ghcr.io/${{ github.repository }}:static" | xargs -I {} cosign sign --yes {}@${DIGEST}
60
+ echo "ghcr.io/${{ env.IMAGE_NAME }}:static" | xargs -I {} cosign sign --yes {}@${DIGEST}
Original file line number Diff line number Diff line change 4
4
5
5
env :
6
6
REGISTRY : ghcr.io
7
- IMAGE_NAME : ${{ github.repository }}
8
7
9
8
jobs :
10
9
build :
@@ -40,13 +39,17 @@ jobs:
40
39
with :
41
40
images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
42
41
42
+ - id : lower-repo
43
+ run : |
44
+ echo "IMAGE_NAME=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
45
+
43
46
- name : Build and push Docker image
44
47
id : build-and-push
45
48
uses : docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
46
49
with :
47
50
context : .
48
51
push : ${{ github.event_name != 'pull_request' }}
49
- tags : ghcr.io/${{ github.repository }}:latest,ghcr.io/${{ github.repository }}:daily
52
+ tags : ghcr.io/${{ env.IMAGE_NAME }}:latest,ghcr.io/${{ env.IMAGE_NAME }}:daily
50
53
labels : ${{ steps.meta.outputs.labels }}
51
54
cache-from : type=gha
52
55
cache-to : type=gha,mode=max
56
59
env :
57
60
DIGEST : ${{ steps.build-and-push.outputs.digest }}
58
61
run : |
59
- echo "ghcr.io/${{ github.repository }}:daily" | xargs -I {} cosign sign --yes {}@${DIGEST}
60
- echo "ghcr.io/${{ github.repository }}:latest" | xargs -I {} cosign sign --yes {}@${DIGEST}
62
+ echo "ghcr.io/${{ env.IMAGE_NAME }}:daily" | xargs -I {} cosign sign --yes {}@${DIGEST}
63
+ echo "ghcr.io/${{ env.IMAGE_NAME }}:latest" | xargs -I {} cosign sign --yes {}@${DIGEST}
Original file line number Diff line number Diff line change @@ -25,17 +25,21 @@ jobs:
25
25
username : ${{ github.actor }}
26
26
password : ${{ secrets.GITHUB_TOKEN }}
27
27
28
+ - id : lower-repo
29
+ run : |
30
+ echo "IMAGE_NAME=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
31
+
28
32
- name : Build and push image
29
33
id : push-step
30
34
uses : docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
31
35
with :
32
36
push : true
33
- tags : ghcr.io/${{ github.repository }}:latest
37
+ tags : ghcr.io/${{ env.IMAGE_NAME }}:latest
34
38
context : .
35
39
36
40
- name : Attest image
37
41
uses : github-early-access/generate-build-provenance@main
38
42
with :
39
- subject-name : ghcr.io/${{ github.repository }}
43
+ subject-name : ghcr.io/${{ env.IMAGE_NAME }}
40
44
subject-digest : ${{ steps.push-step.outputs.digest }}
41
45
push-to-registry : true
Original file line number Diff line number Diff line change @@ -21,18 +21,22 @@ jobs:
21
21
username : ${{ github.actor }}
22
22
password : ${{ secrets.GITHUB_TOKEN }}
23
23
24
+ - id : lower-repo
25
+ run : |
26
+ echo "IMAGE_NAME=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
27
+
24
28
- name : Build and push image
25
29
id : push-step
26
30
uses : docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
27
31
with :
28
32
push : true
29
- tags : ghcr.io/${{ github.repository }}:static
33
+ tags : ghcr.io/${{ env.IMAGE_NAME }}:static
30
34
context : .
31
35
file : Dockerfile.static
32
36
33
37
- name : Attest image
34
38
uses : github-early-access/generate-build-provenance@main
35
39
with :
36
- subject-name : ghcr.io/${{ github.repository }}
40
+ subject-name : ghcr.io/${{ env.IMAGE_NAME }}
37
41
subject-digest : ${{ steps.push-step.outputs.digest }}
38
42
push-to-registry : true
Original file line number Diff line number Diff line change @@ -21,18 +21,22 @@ jobs:
21
21
username : ${{ github.actor }}
22
22
password : ${{ secrets.GITHUB_TOKEN }}
23
23
24
+ - id : lower-repo
25
+ run : |
26
+ echo "IMAGE_NAME=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
27
+
24
28
- name : Build and push image
25
29
id : push-step
26
30
uses : docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
27
31
with :
28
32
push : true
29
- tags : ghcr.io/${{ github.repository }}:static
33
+ tags : ghcr.io/${{ env.IMAGE_NAME }}:static
30
34
context : .
31
35
file : Dockerfile.static
32
36
33
37
- name : Attest image
34
38
uses : github-early-access/generate-build-provenance@main
35
39
with :
36
- subject-name : ghcr.io/${{ github.repository }}
40
+ subject-name : ghcr.io/${{ env.IMAGE_NAME }}
37
41
subject-digest : ${{ steps.push-step.outputs.digest }}
38
42
push-to-registry : true
Original file line number Diff line number Diff line change @@ -21,17 +21,21 @@ jobs:
21
21
username : ${{ github.actor }}
22
22
password : ${{ secrets.GITHUB_TOKEN }}
23
23
24
+ - id : lower-repo
25
+ run : |
26
+ echo "IMAGE_NAME=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
27
+
24
28
- name : Build and push image
25
29
id : push-step
26
30
uses : docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
27
31
with :
28
32
push : true
29
- tags : ghcr.io/${{ github.repository }}:latest
33
+ tags : ghcr.io/${{ env.IMAGE_NAME }}:latest
30
34
context : .
31
35
32
36
- name : Attest image
33
37
uses : github-early-access/generate-build-provenance@main
34
38
with :
35
- subject-name : ghcr.io/${{ github.repository }}
39
+ subject-name : ghcr.io/${{ env.IMAGE_NAME }}
36
40
subject-digest : ${{ steps.push-step.outputs.digest }}
37
41
push-to-registry : true
Original file line number Diff line number Diff line change 4
4
5
5
env :
6
6
REGISTRY : ghcr.io
7
- IMAGE_NAME : ${{ github.repository }}
8
7
9
8
jobs :
10
9
build :
34
33
username : ${{ github.actor }}
35
34
password : ${{ secrets.GITHUB_TOKEN }}
36
35
36
+ - id : lower-repo
37
+ run : |
38
+ echo "IMAGE_NAME=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
39
+
37
40
- name : Extract Docker metadata
38
41
id : meta
39
42
uses : docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
46
49
with :
47
50
context : .
48
51
push : ${{ github.event_name != 'pull_request' }}
49
- tags : ghcr.io/${{ github.repository }}:latest,ghcr.io/${{ github.repository }}:daily
52
+ tags : ghcr.io/${{ env.IMAGE_NAME }}:latest,ghcr.io/${{ env.IMAGE_NAME }}:daily
50
53
labels : ${{ steps.meta.outputs.labels }}
51
54
cache-from : type=gha
52
- cache-to : type=gha,mode=max
53
-
54
- # - name: Sign the published Docker image
55
- # env:
56
- # DIGEST: ${{ steps.build-and-push.outputs.digest }}
57
- # run: |
58
- # echo "ghcr.io/${{ github.repository }}:daily" | xargs -I {} cosign sign --yes {}@${DIGEST}
59
- # echo "ghcr.io/${{ github.repository }}:latest" | xargs -I {} cosign sign --yes {}@${DIGEST}
55
+ cache-to : type=gha,mode=max
You can’t perform that action at this time.
0 commit comments