Skip to content

Commit 329dff3

Browse files
committed
chore(ci): remove env for container name
1 parent fdd6d81 commit 329dff3

1 file changed

Lines changed: 17 additions & 20 deletions

File tree

.github/workflows/build.yml

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ permissions:
1919
id-token: write
2020
packages: write
2121

22-
env:
23-
CONTAINER_IMAGE: tibiadata/tibiadata-api-go
24-
2522
jobs:
2623
build:
2724
name: build (${{ matrix.platform }})
@@ -50,8 +47,8 @@ jobs:
5047
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f #v5.8.0
5148
with:
5249
images: |
53-
${{ env.CONTAINER_IMAGE }}
54-
ghcr.io/${{ env.CONTAINER_IMAGE }}
50+
${{ github.repository }}
51+
ghcr.io/${{ github.repository }}
5552
tags: |
5653
type=edge
5754
type=ref,event=branch,enable={{is_not_default_branch}}
@@ -93,8 +90,8 @@ jobs:
9390
annotations: ${{ steps.docker_meta.outputs.annotations }}
9491
labels: ${{ steps.docker_meta.outputs.labels }}
9592
tags: |
96-
${{ env.CONTAINER_IMAGE }}
97-
ghcr.io/${{ env.CONTAINER_IMAGE }}
93+
${{ github.repository }}
94+
ghcr.io/${{ github.repository }}
9895
cache-from: type=gha,scope=${{ matrix.platform }}
9996
cache-to: type=gha,scope=${{ matrix.platform }},mode=max
10097
sbom: true
@@ -143,8 +140,8 @@ jobs:
143140
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f #v5.8.0
144141
with:
145142
images: |
146-
${{ env.CONTAINER_IMAGE }}
147-
ghcr.io/${{ env.CONTAINER_IMAGE }}
143+
${{ github.repository }}
144+
ghcr.io/${{ github.repository }}
148145
tags: |
149146
type=edge
150147
type=ref,event=branch,enable={{is_not_default_branch}}
@@ -187,42 +184,42 @@ jobs:
187184
# Create the manifest list and push to both registries
188185
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
189186
$(jq -cr '.annotations | to_entries[] | "--annotation \"\(.value)\""' <<<"$DOCKER_METADATA_OUTPUT_JSON") \
190-
$(printf '${{ env.CONTAINER_IMAGE }}@sha256:%s ' *) \
191-
$(printf 'ghcr.io/${{ env.CONTAINER_IMAGE }}@sha256:%s ' *)
187+
$(printf '${{ github.repository }}@sha256:%s ' *) \
188+
$(printf 'ghcr.io/${{ github.repository }}@sha256:%s ' *)
192189
193190
# Get the digest of the created manifest list
194-
DIGEST=$(docker buildx imagetools inspect ghcr.io/${{ env.CONTAINER_IMAGE }}:${{ steps.docker_meta.outputs.version }} --format '{{json .Manifest.Digest}}' | jq -r .)
191+
DIGEST=$(docker buildx imagetools inspect ghcr.io/${{ github.repository }}:${{ steps.docker_meta.outputs.version }} --format '{{json .Manifest.Digest}}' | jq -r .)
195192
echo "digest=$DIGEST" >> $GITHUB_OUTPUT
196193
197194
- name: Inspect images
198195
run: |
199196
echo "::group::DockerHub"
200-
docker buildx imagetools inspect ${{ env.CONTAINER_IMAGE }}:${{ steps.docker_meta.outputs.version }}
197+
docker buildx imagetools inspect ${{ github.repository }}:${{ steps.docker_meta.outputs.version }}
201198
echo "::endgroup::"
202199
203200
echo "::group::GitHub Container Registry"
204-
docker buildx imagetools inspect ghcr.io/${{ env.CONTAINER_IMAGE }}:${{ steps.docker_meta.outputs.version }}
201+
docker buildx imagetools inspect ghcr.io/${{ github.repository }}:${{ steps.docker_meta.outputs.version }}
205202
echo "::endgroup::"
206203
207204
- name: Cosign sign images (GitHub OIDC)
208205
run: |
209206
cosign sign --yes \
210-
${{ env.CONTAINER_IMAGE }}@${{ steps.docker_build.outputs.digest }}
207+
${{ github.repository }}@${{ steps.docker_build.outputs.digest }}
211208
212209
cosign sign --yes \
213-
ghcr.io/${{ env.CONTAINER_IMAGE }}@${{ steps.docker_build.outputs.digest }}
210+
ghcr.io/${{ github.repository }}@${{ steps.docker_build.outputs.digest }}
214211
215212
- name: Attest docker build (DockerHub)
216213
uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a #v3.0.0
217214
with:
218-
subject-name: index.docker.io/${{ env.CONTAINER_IMAGE }}
215+
subject-name: index.docker.io/${{ github.repository }}
219216
subject-digest: ${{ steps.docker_build.outputs.digest }}
220217
push-to-registry: true
221218

222219
- name: Attest docker build (GitHub Container Registry)
223220
uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a #v3.0.0
224221
with:
225-
subject-name: ghcr.io/${{ env.CONTAINER_IMAGE }}
222+
subject-name: ghcr.io/${{ github.repository }}
226223
subject-digest: ${{ steps.docker_build.outputs.digest }}
227224
push-to-registry: true
228225

@@ -247,7 +244,7 @@ jobs:
247244
uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 #v3.0.0
248245
with:
249246
token: ${{ secrets.REPO_ACCESS_TOKEN }}
250-
repository: TibiaData/tibiadata-argocd-app-of-apps
247+
repository: tibiadata/tibiadata-argocd-app-of-apps
251248
event-type: bump-tibiadata-api-go-image-sha
252249
client-payload: |-
253250
{
@@ -269,7 +266,7 @@ jobs:
269266
uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 #v3.0.0
270267
with:
271268
token: ${{ secrets.REPO_ACCESS_TOKEN }}
272-
repository: TibiaData/tibiadata-helm-charts
269+
repository: tibiadata/tibiadata-helm-charts
273270
event-type: bump-helm-chart-release
274271
client-payload: |-
275272
{

0 commit comments

Comments
 (0)