Skip to content

Commit

Permalink
New action builds Docker image on push with cache
Browse files Browse the repository at this point in the history
  • Loading branch information
vicnett committed Nov 4, 2024
1 parent 1dceaf1 commit c5f7c23
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/build-image-on-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build Docker image as test

on:
push:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build image
uses: docker/build-push-action@v6
with:
context: .
push: false
# cache-from: type=gha
# cache-to: type=gha,mode=max

0 comments on commit c5f7c23

Please sign in to comment.