Skip to content

Commit

Permalink
revert layer caching
Browse files Browse the repository at this point in the history
  • Loading branch information
yoomlam committed May 17, 2024
1 parent b74351f commit 02e5b1c
Showing 1 changed file with 8 additions and 28 deletions.
36 changes: 8 additions & 28 deletions .github/workflows/push-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,36 +59,16 @@ jobs:
if: inputs.build_image
uses: actions/checkout@v4

- name: Set up Docker Buildx for build-push-action
- name: "Build image ${{ inputs.image_name }} with tag '${{ inputs.image_tag }}'"
if: inputs.build_image
uses: docker/setup-buildx-action@v3
# with:
# version: latest
# driver-opts: image=moby/buildkit:latest

- name: "Login to Docker Hub for build-push-action"
if: inputs.build_image
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: "Build Docker image"
id: build
if: inputs.build_image
uses: docker/build-push-action@v5
# env:
# ECR_PATH: ${{ steps.login-ecr.outputs.registry }}/${{ secrets.ECR_REPO }}
with:
context: ${{ inputs.dockerfile_folder }}
tags: "${{ inputs.image_name }}:${{ inputs.image_tag }}"
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
# cache-from: type=registry,ref=${{ env.ECR_PATH }}:dockercache
# cache-to: type=registry,ref=${{ env.ECR_PATH }}:dockercache,mode=max,image-manifest=true
shell: bash
env:
ECR_PATH: ${{ steps.login-ecr.outputs.registry }}/${{ secrets.ECR_REPO }}
run: |
cd ${{ inputs.dockerfile_folder }}
docker build -t "${{ inputs.image_name }}:${{ inputs.image_tag }}" .
- name: "Publish image ${{ inputs.image_name }} with tag '${{ inputs.image_tag }}'"
- name: "Publish image to AWS ECR'"
if: inputs.build_image
shell: bash
env:
Expand Down

0 comments on commit 02e5b1c

Please sign in to comment.