mirror of
https://github.com/itzg/docker-minecraft-server
synced 2024-12-16 23:23:06 +00:00
ci: auto-merge from master
This commit is contained in:
commit
dc5192e2e7
2 changed files with 21 additions and 13 deletions
17
.github/workflows/build-multiarch.yml
vendored
17
.github/workflows/build-multiarch.yml
vendored
|
@ -25,8 +25,6 @@ jobs:
|
||||||
docker-buildx:
|
docker-buildx:
|
||||||
if: github.repository == 'itzg/docker-minecraft-server'
|
if: github.repository == 'itzg/docker-minecraft-server'
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
env:
|
|
||||||
CACHE_NAME: java11
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2.3.4
|
uses: actions/checkout@v2.3.4
|
||||||
|
@ -42,7 +40,7 @@ jobs:
|
||||||
type=ref,event=tag
|
type=ref,event=tag
|
||||||
type=edge,branch=master
|
type=edge,branch=master
|
||||||
flavor: |
|
flavor: |
|
||||||
latest=false
|
latest=true
|
||||||
|
|
||||||
- name: Setup Docker Buildx
|
- name: Setup Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v1
|
||||||
|
@ -51,9 +49,8 @@ jobs:
|
||||||
uses: actions/cache@v2.1.6
|
uses: actions/cache@v2.1.6
|
||||||
with:
|
with:
|
||||||
path: /tmp/.buildx-cache
|
path: /tmp/.buildx-cache
|
||||||
key: ${{ runner.os }}-buildx-${{ env.CACHE_NAME }}-${{ github.sha }}
|
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-buildx-${{ env.CACHE_NAME }}-
|
|
||||||
${{ runner.os }}-buildx-
|
${{ runner.os }}-buildx-
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
|
@ -76,8 +73,16 @@ jobs:
|
||||||
# ensure latest base image is used
|
# ensure latest base image is used
|
||||||
pull: true
|
pull: true
|
||||||
cache-from: type=local,src=/tmp/.buildx-cache
|
cache-from: type=local,src=/tmp/.buildx-cache
|
||||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
cache-to: type=local,dest=/tmp/.buildx-cache-new
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|
||||||
- name: Image digest
|
- name: Image digest
|
||||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||||
|
|
||||||
|
- # Temp fix
|
||||||
|
# https://github.com/docker/build-push-action/issues/252
|
||||||
|
# https://github.com/moby/buildkit/issues/1896
|
||||||
|
name: Move cache
|
||||||
|
run: |
|
||||||
|
rm -rf /tmp/.buildx-cache
|
||||||
|
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
|
17
.github/workflows/main.yml
vendored
17
.github/workflows/main.yml
vendored
|
@ -29,8 +29,6 @@ jobs:
|
||||||
needs:
|
needs:
|
||||||
- test
|
- test
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
env:
|
|
||||||
CACHE_NAME: master
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.3.4
|
- uses: actions/checkout@v2.3.4
|
||||||
|
@ -51,9 +49,7 @@ jobs:
|
||||||
fi
|
fi
|
||||||
TAGS="${DOCKER_IMAGE}:${VERSION//\//-}"
|
TAGS="${DOCKER_IMAGE}:${VERSION//\//-}"
|
||||||
echo ::set-output name=tags::${TAGS}
|
echo ::set-output name=tags::${TAGS}
|
||||||
echo ::set-output name=cache_from::${TAGS}
|
|
||||||
echo ::set-output name=version::${VERSION//\//-}
|
echo ::set-output name=version::${VERSION//\//-}
|
||||||
echo ::set-output name=cache_version::${VERSION//\//-}
|
|
||||||
|
|
||||||
- name: Setup Docker Buildx
|
- name: Setup Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v1
|
||||||
|
@ -62,9 +58,8 @@ jobs:
|
||||||
uses: actions/cache@v2.1.6
|
uses: actions/cache@v2.1.6
|
||||||
with:
|
with:
|
||||||
path: /tmp/.buildx-cache
|
path: /tmp/.buildx-cache
|
||||||
key: ${{ runner.os }}-buildx-${{ env.CACHE_NAME }}-${{ github.sha }}
|
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-buildx-${{ env.CACHE_NAME }}-
|
|
||||||
${{ runner.os }}-buildx-
|
${{ runner.os }}-buildx-
|
||||||
|
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
|
@ -86,7 +81,7 @@ jobs:
|
||||||
# tags determined by prep step
|
# tags determined by prep step
|
||||||
tags: ${{ steps.prep.outputs.tags }}
|
tags: ${{ steps.prep.outputs.tags }}
|
||||||
cache-from: type=local,src=/tmp/.buildx-cache
|
cache-from: type=local,src=/tmp/.buildx-cache
|
||||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
cache-to: type=local,dest=/tmp/.buildx-cache-new
|
||||||
labels: |
|
labels: |
|
||||||
org.opencontainers.image.documentation=https://github.com/itzg/docker-minecraft-server
|
org.opencontainers.image.documentation=https://github.com/itzg/docker-minecraft-server
|
||||||
org.opencontainers.image.version=${{ steps.prep.outputs.version }}
|
org.opencontainers.image.version=${{ steps.prep.outputs.version }}
|
||||||
|
@ -95,3 +90,11 @@ jobs:
|
||||||
|
|
||||||
- name: Image digest
|
- name: Image digest
|
||||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||||
|
|
||||||
|
- # Temp fix
|
||||||
|
# https://github.com/docker/build-push-action/issues/252
|
||||||
|
# https://github.com/moby/buildkit/issues/1896
|
||||||
|
name: Move cache
|
||||||
|
run: |
|
||||||
|
rm -rf /tmp/.buildx-cache
|
||||||
|
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
|
||||||
|
|
Loading…
Reference in a new issue