File tree 3 files changed +44
-14
lines changed 3 files changed +44
-14
lines changed Original file line number Diff line number Diff line change @@ -15,10 +15,24 @@ jobs:
15
15
ref : ${{ github.event.pull_request.head.ref }}
16
16
repository : ${{ github.event.pull_request.head.repo.full_name }}
17
17
18
- - name : Build Docker image
18
+ - name : Set up QEMU
19
+ uses : docker/setup-qemu-action@v3
20
+
21
+ - name : Set up Docker Buildx
22
+ uses : docker/setup-buildx-action@v3
23
+
24
+ - name : Get variables
19
25
run : |
20
- VERSION=$(grep "docker://quay.io/terraform-docs/gh-actions" action.yml | cut -d: -f4 | sed 's/"//g')
21
- docker build --pull --tag quay.io/terraform-docs/gh-actions:${VERSION} .
26
+ image_version=$(grep "docker://quay.io/terraform-docs/gh-actions" action.yml | cut -d: -f4 | sed 's/"//g')
27
+ echo "image_version=${image_version}" >> "$GITHUB_ENV"
28
+
29
+ - name : Build Docker images
30
+ uses : docker/build-push-action@v6
31
+ with :
32
+ outputs : " type=image"
33
+ platforms : linux/amd64,linux/arm64
34
+ push : false
35
+ tags : quay.io/${{ github.event.repository.name }}/gh-actions:${{ env.image_version }}
22
36
23
37
- name : Should generate USAGE.md for tf11_basic
24
38
uses : ./
94
108
git-commit-message : " terraform-docs: automated action"
95
109
96
110
- name : Should generate README.md for tf12_fail_diff and fail on diff
111
+ continue-on-error : true
97
112
uses : ./
98
113
with :
99
114
working-dir : examples/tf12_fail_diff
Original file line number Diff line number Diff line change 15
15
- name : Checkout
16
16
uses : actions/checkout@v4
17
17
18
+ - name : Set up QEMU
19
+ uses : docker/setup-qemu-action@v3
20
+
21
+ - name : Set up Docker Buildx
22
+ uses : docker/setup-buildx-action@v3
23
+
18
24
- name : Login to Docker
19
25
uses : docker/login-action@v3
20
26
if : env.REGISTRY_USERNAME != ''
@@ -23,11 +29,14 @@ jobs:
23
29
username : ${{ secrets.REGISTRY_USERNAME }}
24
30
password : ${{ secrets.REGISTRY_PASSWORD }}
25
31
26
- - name : Build Docker image
32
+ - name : Build and push Docker image
27
33
if : env.REGISTRY_USERNAME != ''
28
- run : |
29
- docker build --pull --tag quay.io/terraform-docs/gh-actions:edge .
30
- docker push quay.io/terraform-docs/gh-actions:edge
34
+ uses : docker/build-push-action@v6
35
+ with :
36
+ outputs : " type=registry"
37
+ platforms : linux/amd64,linux/arm64
38
+ push : true
39
+ tags : quay.io/${{ github.event.repository.name }}/gh-actions:edge
31
40
32
41
release-draft :
33
42
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 16
16
jobs :
17
17
release :
18
18
runs-on : ubuntu-latest
19
- if : " !contains(github.event.head_commit.message, '[ci skip]')"
20
19
permissions :
21
20
contents : write
22
21
steps :
68
67
release_version="${{ inputs.version }}"
69
68
echo "release_version=${release_version//v/}" >> "$GITHUB_ENV"
70
69
70
+ - name : Set up QEMU
71
+ uses : docker/setup-qemu-action@v3
72
+
73
+ - name : Set up Docker Buildx
74
+ uses : docker/setup-buildx-action@v3
75
+
71
76
- name : Login to Docker
72
77
uses : docker/login-action@v3
73
78
if : env.REGISTRY_USERNAME != ''
@@ -76,13 +81,14 @@ jobs:
76
81
username : ${{ secrets.REGISTRY_USERNAME }}
77
82
password : ${{ secrets.REGISTRY_PASSWORD }}
78
83
79
- - name : Build Docker image
84
+ - name : Build and push Docker image
80
85
if : env.REGISTRY_USERNAME != ''
81
- run : |
82
- docker build --pull --tag quay.io/terraform-docs/gh-actions:${{ env.release_version }} .
83
- docker build --pull --tag quay.io/terraform-docs/gh-actions:latest .
84
- docker push quay.io/terraform-docs/gh-actions:${{ env.release_version }}
85
- docker push quay.io/terraform-docs/gh-actions:latest
86
+ uses : docker/build-push-action@v6
87
+ with :
88
+ outputs : " type=registry"
89
+ platforms : linux/amd64,linux/arm64
90
+ push : true
91
+ tags : quay.io/${{ github.event.repository.name }}/gh-actions:latest,quay.io/${{ github.event.repository.name }}/gh-actions:${{ env.release_version }}
86
92
87
93
update-tag :
88
94
runs-on : ubuntu-latest
You can’t perform that action at this time.
0 commit comments