mirror of
https://github.com/gurucomputing/headscale-ui.git
synced 2026-01-23 02:34:43 +00:00
add support for docker layer caching and arm64/arm32v7 images (#81)
This commit is contained in:
parent
02e243a96e
commit
8664048ffc
2 changed files with 32 additions and 1 deletions
16
.github/workflows/publish-dev-image.yaml
vendored
16
.github/workflows/publish-dev-image.yaml
vendored
|
|
@ -26,6 +26,19 @@ jobs:
|
|||
- name: Checkout Repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
restore-keys: ${{ runner.os }}-buildx-
|
||||
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
|
|
@ -43,4 +56,7 @@ jobs:
|
|||
tags: |
|
||||
ghcr.io/${{ github.repository }}-dev:latest
|
||||
ghcr.io/${{ github.repository }}-dev:${{ steps.gathervars.outputs.VERSION }}
|
||||
platforms: linux/amd64,linux/arm64,linux/arm32v7
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
push: true
|
||||
|
|
|
|||
17
.github/workflows/publish-release.yaml
vendored
17
.github/workflows/publish-release.yaml
vendored
|
|
@ -23,7 +23,6 @@ jobs:
|
|||
|
||||
# setting tags
|
||||
if echo "$VERSION" | grep -q "beta"; then
|
||||
|
||||
TAGS="ghcr.io/${{ github.repository }}:beta, ghcr.io/${{ github.repository }}:$VERSION, ghcr.io/${{ github.repository }}:latest"
|
||||
PRIMARY_TAG=latest
|
||||
else
|
||||
|
|
@ -36,6 +35,19 @@ jobs:
|
|||
$(docker manifest inspect ghcr.io/${{ github.repository }}:$VERSION > /dev/null) || NOT_PREVIOUSLY_PUBLISHED=1
|
||||
echo "::set-output name=NOT_PREVIOUSLY_PUBLISHED::$NOT_PREVIOUSLY_PUBLISHED"
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
restore-keys: ${{ runner.os }}-buildx-
|
||||
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@v1
|
||||
if: ${{ steps.gathervars.outputs.NOT_PREVIOUSLY_PUBLISHED != 0 }}
|
||||
|
|
@ -54,6 +66,9 @@ jobs:
|
|||
context: ./docker/production
|
||||
tags: |
|
||||
${{ steps.gathervars.outputs.TAG }}
|
||||
platforms: linux/amd64,linux/arm64,linux/arm32v7
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
push: true
|
||||
|
||||
- name: Extract build out of docker image
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue