Skip to content

Commit

Permalink
Testing cache docker build
Browse files Browse the repository at this point in the history
Signed-off-by: 0ssigeno <s.berni@certego.net>
  • Loading branch information
0ssigeno committed Oct 3, 2023
1 parent c07ba3c commit 58652da
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -419,10 +419,19 @@ jobs:
shell: bash
working-directory: ${{ inputs.check_docs_directory }}

- name: Build DockerFile
- name: Set up Docker Buildx
if: inputs.check_dockerfile
run: |
docker build -f ${{ inputs.check_dockerfile }} .
uses: docker/setup-buildx-action@v3

- name: Build and push
uses: docker/build-push-action@v5
if: inputs.check_dockerfile
with:
context: ${{ inputs.working_directory }}
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
file: ${{ inputs.working_directory }}/${{ inputs.check_dockerfile }
working-directory: ${{ inputs.working_directory }}

- name: Start services
Expand Down
15 changes: 12 additions & 3 deletions workflows/_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -419,10 +419,19 @@ jobs:
shell: bash
working-directory: ${{ inputs.check_docs_directory }}

- name: Build DockerFile
- name: Set up Docker Buildx
if: inputs.check_dockerfile
run: |
docker build -f ${{ inputs.check_dockerfile }} .
uses: docker/setup-buildx-action@v3

- name: Build and push
uses: docker/build-push-action@v5
if: inputs.check_dockerfile
with:
context: ${{ inputs.working_directory }}
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
file: ${{ inputs.working_directory }}/${{ inputs.check_dockerfile }
working-directory: ${{ inputs.working_directory }}

- name: Start services
Expand Down

0 comments on commit 58652da

Please sign in to comment.