Skip to content

Commit 0de8f3b

Browse files
committed
Don't push to container registries when credentials are unavailablex
1 parent dfd929c commit 0de8f3b

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

.github/workflows/ci.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
build-args: channel=${{ matrix.channel }}
5050
target: toolchain
5151
pull: true
52-
push: true
52+
push: "${{ !!env.SECRETS_ARE_AVAILABLE }}"
5353
tags: "${{ env.TAG_PREFIX }}--${{ github.run_id }}"
5454
cache-from: |-
5555
${{ env.TAG_PREFIX }}--${{ github.run_id }}
@@ -65,7 +65,7 @@ jobs:
6565
build-args: channel=${{ matrix.channel }}
6666
target: bare-sources
6767
pull: true
68-
push: true
68+
push: "${{ !!env.SECRETS_ARE_AVAILABLE }}"
6969
tags: "${{ env.TAG_PREFIX }}--${{ github.run_id }}"
7070
cache-from: |-
7171
${{ env.TAG_PREFIX }}--${{ github.run_id }}
@@ -81,7 +81,7 @@ jobs:
8181
build-args: channel=${{ matrix.channel }}
8282
target: munge
8383
pull: true
84-
push: true
84+
push: "${{ !!env.SECRETS_ARE_AVAILABLE }}"
8585
tags: "${{ env.TAG_PREFIX }}--${{ github.run_id }}"
8686
cache-from: |-
8787
${{ env.TAG_PREFIX }}--${{ github.run_id }}
@@ -97,7 +97,7 @@ jobs:
9797
build-args: channel=${{ matrix.channel }}
9898
target: sources
9999
pull: true
100-
push: true
100+
push: "${{ !!env.SECRETS_ARE_AVAILABLE }}"
101101
tags: "${{ env.TAG_PREFIX }}--${{ github.run_id }}"
102102
cache-from: |-
103103
${{ env.TAG_PREFIX }}--${{ github.run_id }}
@@ -110,7 +110,7 @@ jobs:
110110
file: compiler/base/Dockerfile
111111
build-args: channel=${{ matrix.channel }}
112112
pull: true
113-
push: true
113+
push: "${{ !!env.SECRETS_ARE_AVAILABLE }}"
114114
tags: "${{ env.IMAGE_NAME }}:${{ github.run_id }}"
115115
cache-from: |-
116116
${{ env.IMAGE_NAME }}:${{ github.run_id }}
@@ -149,7 +149,7 @@ jobs:
149149
file: compiler/${{ matrix.tool }}/Dockerfile
150150
build-args: base_image=ghcr.io/integer32llc/rust-playground-ci-rust-nightly:sources--${{ github.run_id }}
151151
pull: true
152-
push: true
152+
push: "${{ !!env.SECRETS_ARE_AVAILABLE }}"
153153
tags: "${{ env.IMAGE_NAME }}:${{ github.run_id }}"
154154
cache-from: |-
155155
${{ env.IMAGE_NAME }}:${{ github.run_id }}

.github/workflows/cron.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
build-args: channel=${{ matrix.channel }}
5555
target: toolchain
5656
pull: true
57-
push: true
57+
push: "${{ !!env.SECRETS_ARE_AVAILABLE }}"
5858
tags: "${{ env.TAG_PREFIX }}--${{ github.run_id }}"
5959
cache-from: |-
6060
${{ env.TAG_PREFIX }}--${{ github.run_id }}
@@ -70,7 +70,7 @@ jobs:
7070
build-args: channel=${{ matrix.channel }}
7171
target: bare-sources
7272
pull: true
73-
push: true
73+
push: "${{ !!env.SECRETS_ARE_AVAILABLE }}"
7474
tags: "${{ env.TAG_PREFIX }}--${{ github.run_id }}"
7575
cache-from: |-
7676
${{ env.TAG_PREFIX }}--${{ github.run_id }}
@@ -86,7 +86,7 @@ jobs:
8686
build-args: channel=${{ matrix.channel }}
8787
target: munge
8888
pull: true
89-
push: true
89+
push: "${{ !!env.SECRETS_ARE_AVAILABLE }}"
9090
tags: "${{ env.TAG_PREFIX }}--${{ github.run_id }}"
9191
cache-from: |-
9292
${{ env.TAG_PREFIX }}--${{ github.run_id }}
@@ -102,7 +102,7 @@ jobs:
102102
build-args: channel=${{ matrix.channel }}
103103
target: sources
104104
pull: true
105-
push: true
105+
push: "${{ !!env.SECRETS_ARE_AVAILABLE }}"
106106
tags: "${{ env.TAG_PREFIX }}--${{ github.run_id }}"
107107
cache-from: |-
108108
${{ env.TAG_PREFIX }}--${{ github.run_id }}
@@ -115,7 +115,7 @@ jobs:
115115
file: compiler/base/Dockerfile
116116
build-args: channel=${{ matrix.channel }}
117117
pull: true
118-
push: true
118+
push: "${{ !!env.SECRETS_ARE_AVAILABLE }}"
119119
tags: "${{ env.IMAGE_NAME }}:${{ github.run_id }}"
120120
cache-from: |-
121121
${{ env.IMAGE_NAME }}:${{ github.run_id }}
@@ -172,7 +172,7 @@ jobs:
172172
file: compiler/${{ matrix.tool }}/Dockerfile
173173
build-args: base_image=ghcr.io/integer32llc/rust-playground-ci-rust-nightly:sources--${{ github.run_id }}
174174
pull: true
175-
push: true
175+
push: "${{ !!env.SECRETS_ARE_AVAILABLE }}"
176176
tags: "${{ env.IMAGE_NAME }}:${{ github.run_id }}"
177177
cache-from: |-
178178
${{ env.IMAGE_NAME }}:${{ github.run_id }}

ci/workflows.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ components:
5757
channel=${{ matrix.channel }}
5858
target: toolchain
5959
pull: true
60-
push: true
60+
push: ${{ !!env.SECRETS_ARE_AVAILABLE }}
6161
tags: |-
6262
${{ env.TAG_PREFIX }}--${{ github.run_id }}
6363
cache-from: |-
@@ -77,7 +77,7 @@ components:
7777
channel=${{ matrix.channel }}
7878
target: bare-sources
7979
pull: true
80-
push: true
80+
push: ${{ !!env.SECRETS_ARE_AVAILABLE }}
8181
tags: |-
8282
${{ env.TAG_PREFIX }}--${{ github.run_id }}
8383
cache-from: |-
@@ -97,7 +97,7 @@ components:
9797
channel=${{ matrix.channel }}
9898
target: munge
9999
pull: true
100-
push: true
100+
push: ${{ !!env.SECRETS_ARE_AVAILABLE }}
101101
tags: |-
102102
${{ env.TAG_PREFIX }}--${{ github.run_id }}
103103
cache-from: |-
@@ -117,7 +117,7 @@ components:
117117
channel=${{ matrix.channel }}
118118
target: sources
119119
pull: true
120-
push: true
120+
push: ${{ !!env.SECRETS_ARE_AVAILABLE }}
121121
tags: |-
122122
${{ env.TAG_PREFIX }}--${{ github.run_id }}
123123
cache-from: |-
@@ -134,7 +134,7 @@ components:
134134
build-args: |-
135135
channel=${{ matrix.channel }}
136136
pull: true
137-
push: true
137+
push: ${{ !!env.SECRETS_ARE_AVAILABLE }}
138138
tags: |-
139139
${{ env.IMAGE_NAME }}:${{ github.run_id }}
140140
cache-from: |-
@@ -163,7 +163,7 @@ components:
163163
build-args: |-
164164
base_image=ghcr.io/integer32llc/rust-playground-ci-rust-nightly:sources--${{ github.run_id }}
165165
pull: true
166-
push: true
166+
push: ${{ !!env.SECRETS_ARE_AVAILABLE }}
167167
tags: |-
168168
${{ env.IMAGE_NAME }}:${{ github.run_id }}
169169
cache-from: |-

0 commit comments

Comments
 (0)