Skip to content

Commit

Permalink
PS-744: CI - docker image - stop generating untagged images from AWS …
Browse files Browse the repository at this point in the history
…registry when pushing a new build (#495)

* stop generation untagged image in registry

* update build-push-action version
  • Loading branch information
aynsix authored Dec 2, 2024
1 parent 24a7afc commit b092ac7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,12 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and Push
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
context: ${{ inputs.withLibs && './' || inputs.context }}
file: ${{ inputs.context }}/Dockerfile
target: ${{ inputs.target }}
provenance: false
push: true
cache-from: type=registry,ref=${{ env.REGISTRY_NAMESPACE }}${{ inputs.image }}:build-cache
cache-to: type=registry,mode=max,ref=${{ env.REGISTRY_NAMESPACE }}${{ inputs.image }}:build-cache
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/build_api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,12 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and Push API PHP
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
context: ${{ inputs.withLibs && './' || inputs.context }}
file: ${{ inputs.context }}/Dockerfile
target: api-php
provenance: false
push: true
cache-from: type=registry,ref=${{ env.REGISTRY_NAMESPACE }}${{ inputs.prefix }}-api-php:build-cache
cache-to: type=registry,mode=max,ref=${{ env.REGISTRY_NAMESPACE }}${{ inputs.prefix }}-api-php:build-cache
Expand All @@ -55,11 +56,12 @@ jobs:
${{ env.REGISTRY_NAMESPACE }}${{ inputs.prefix }}-api-php:${{ env.DOCKER_TAG }}
- name: Build and Push API NGINX
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
context: ${{ inputs.withLibs && './' || inputs.context }}
file: ${{ inputs.context }}/Dockerfile
target: api-nginx
provenance: false
push: true
cache-from: type=registry,ref=${{ env.REGISTRY_NAMESPACE }}${{ inputs.prefix }}-api-nginx:build-cache
cache-to: type=registry,mode=max,ref=${{ env.REGISTRY_NAMESPACE }}${{ inputs.prefix }}-api-nginx:build-cache
Expand All @@ -70,11 +72,12 @@ jobs:
${{ env.REGISTRY_NAMESPACE }}${{ inputs.prefix }}-api-nginx:${{ env.DOCKER_TAG }}
- name: Build and Push Worker
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
context: ${{ inputs.withLibs && './' || inputs.context }}
file: ${{ inputs.context }}/Dockerfile
target: worker
provenance: false
push: true
cache-from: type=registry,ref=${{ env.REGISTRY_NAMESPACE }}${{ inputs.prefix }}-worker:build-cache
cache-to: type=registry,mode=max,ref=${{ env.REGISTRY_NAMESPACE }}${{ inputs.prefix }}-worker:build-cache
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/build_base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and Push
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
context: ${{ inputs.context }}
target: ${{ inputs.target }}
file: ${{ inputs.context }}/Dockerfile
provenance: false
push: true
cache-from: type=registry,ref=${{ env.REGISTRY_NAMESPACE }}${{ inputs.image }}:build-cache
cache-to: type=registry,mode=max,ref=${{ env.REGISTRY_NAMESPACE }}${{ inputs.image }}:build-cache
Expand Down

0 comments on commit b092ac7

Please sign in to comment.