Skip to content

Commit

Permalink
fix(workflows): cache image build to scaleway repo
Browse files Browse the repository at this point in the history
  • Loading branch information
erman-dev committed Aug 26, 2023
1 parent 904f468 commit cb62903
Showing 1 changed file with 15 additions and 18 deletions.
33 changes: 15 additions & 18 deletions .github/workflows/deploy.yml
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- main
- develop
- issue-163


jobs:
Expand All @@ -14,24 +15,26 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: nologin
password: ${{ secrets.SCW_SECRET_KEY }}
registry: ${{ secrets.SCW_REGISTRY_ENDPOINT }}

- name: Build
uses: docker/build-push-action@v4
with:
context: .
load: true
file: webpack/Dockerfile
# TODO: ends with 400
# cache-from: type=registry,ref=${{ secrets.SCW_REGISTRY_ENDPOINT }}/web:buildcache
# cache-to: type=registry,ref=${{ secrets.SCW_REGISTRY_ENDPOINT }}/web:buildcache,mode=max
cache-from: type=gha
cache-to: type=gha,mode=max
cache-from: type=registry,ref=${{ secrets.SCW_REGISTRY_ENDPOINT }}/web:buildcache
cache-to: type=registry,ref=${{ secrets.SCW_REGISTRY_ENDPOINT }}/web:buildcache,mode=max
tags: webpack:latest
provenance: false

- name: Extract compiled results
run: |
Expand Down Expand Up @@ -110,11 +113,8 @@ jobs:
context: .
file: fiesta/Dockerfile
load: true
# TODO: ends with 400
# cache-from: type=registry,ref=${{ secrets.SCW_REGISTRY_ENDPOINT }}/web:buildcache
# cache-to: type=registry,ref=${{ secrets.SCW_REGISTRY_ENDPOINT }}/web:buildcache,mode=max
cache-from: type=gha
cache-to: type=gha,mode=max
cache-from: type=registry,ref=${{ secrets.SCW_REGISTRY_ENDPOINT }}/web:buildcache
cache-to: type=registry,ref=${{ secrets.SCW_REGISTRY_ENDPOINT }}/web:buildcache,mode=max
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

Expand Down Expand Up @@ -201,11 +201,8 @@ jobs:
context: .
file: nginx/proxy.Dockerfile
push: true
# TODO: ends with 400
# cache-from: type=registry,ref=${{ secrets.SCW_REGISTRY_ENDPOINT }}/web:buildcache
# cache-to: type=registry,ref=${{ secrets.SCW_REGISTRY_ENDPOINT }}/web:buildcache,mode=max
cache-from: type=gha
cache-to: type=gha,mode=max
cache-from: type=registry,ref=${{ secrets.SCW_REGISTRY_ENDPOINT }}/web:buildcache
cache-to: type=registry,ref=${{ secrets.SCW_REGISTRY_ENDPOINT }}/web:buildcache,mode=max
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

Expand Down

0 comments on commit cb62903

Please sign in to comment.