aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorpml68 <contact@pml68.dev>2025-01-05 00:16:32 +0100
committerpml68 <contact@pml68.dev>2025-01-05 00:16:32 +0100
commitd239039ee4a42ff22d5ac859ecca5ab17ecabec7 (patch)
tree05479f2b564c8857b478bc0baba1056744954abf /.github
parentfeat: switch to nightly rust-analyzer from rustup (diff)
downloadnvim-d239039ee4a42ff22d5ac859ecca5ab17ecabec7.tar.gz
ci: add caching for docker images
Diffstat (limited to '')
-rw-r--r--.github/workflows/docker.yml22
1 files changed, 13 insertions, 9 deletions
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index 1d488ab..7c6b3f4 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -30,19 +30,23 @@ jobs:
contents: read
steps:
- - uses: actions/checkout@v4
-
- - name: Build image
- run: docker build . --file ${{ matrix.image.dockerfile }} --tag ${{ matrix.image.tag }} --label "runnumber=${GITHUB_RUN_ID}"
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v3
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- - name: Push image
- run: |
- IMAGE_TAG=ghcr.io/${{ github.repository_owner }}/${{ matrix.image.tag }}
- docker tag ${{ matrix.image.tag }} $IMAGE_TAG
- docker push $IMAGE_TAG
+ - name: Build and push image
+ uses: docker/build-push-action@v6
+ with:
+ context: .
+ file: ${{ matrix.image.dockerfile }}
+ cache-from: type=gha
+ cache-to: type=gha,mode=max
+ push: true
+ tags: ghcr.io/${{ github.repository_owner }}/${{ matrix.image.tag }}:latest
+ labels: |
+ runnumber=${GITHUB_RUN_ID}
- name: Delete previous releases
uses: actions/delete-package-versions@v5