See if this idea works..
All checks were successful
Build and push container image / build (push) Successful in 8m16s

This commit is contained in:
toast 2024-01-08 01:12:00 +11:00
parent 5a8cef6b2e
commit 8aa86b0991

View File

@ -9,13 +9,12 @@ jobs:
steps: steps:
- name: Set up Docker environment - name: Set up Docker environment
run: | run: |
apt update && apt install -y apt-transport-https ca-certificates curl zstd gnupg lsb-release apt update && apt upgrade -y && apt install -y apt-transport-https ca-certificates curl zstd gnupg lsb-release
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \ echo \
"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \ "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \
$(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
apt update && apt upgrade -y && \ apt update && apt install -y docker-ce docker-ce-cli containerd.io
apt install -y docker-ce docker-ce-cli containerd.io
- name: Checkout branch - name: Checkout branch
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
@ -27,11 +26,11 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }} password: ${{ secrets.DOCKER_TOKEN }}
- name: Cache Docker layers - name: Restore from cache
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3 uses: actions/cache/restore@v3 # v3
id: restore-cache
with: with:
path: /tmp/.buildx-cache key: docker-buildx-kon
restore-keys: docker-buildx-kon
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3 uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3
@ -42,10 +41,12 @@ jobs:
platforms: linux/amd64 platforms: linux/amd64
push: true push: true
tags: git.toast-server.net/toast/kon:main tags: git.toast-server.net/toast/kon:main
cache-from: type=registry,ref=git.toast-server.net/toast/kon:main # cache-from: type=registry,ref=git.toast-server.net/toast/kon:main
cache-to: type=inline # cache-to: type=inline
- name: Save to cache - name: Save to cache
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3 uses: actions/cache/save@v3 # v3
id: cache
with: with:
keys: docker-buildx-kon path: /tmp/.buildx-cache
key: docker-buildx-kon