fix(ci/cd): Cache apt packages
This commit is contained in:
parent
c700df21c1
commit
d837b6f4ef
@ -14,19 +14,6 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Docker
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install docker.io -y
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
with:
|
||||
platforms: linux/amd64,linux/arm64
|
||||
|
||||
- name: Get upstream repository
|
||||
run: |
|
||||
git clone https://github.com/ONLYOFFICE/DocumentServer/ upstream
|
||||
@ -43,12 +30,24 @@ jobs:
|
||||
id: check-build-status
|
||||
run: |
|
||||
echo ${{ steps.meta.outputs.tag }}
|
||||
if curl --silent -f -lSL "https://hub.docker.com/v2/repositories/jiriks74/onlyoffice-documentserver/tags/$(echo ${{ steps.meta.outputs.tag }})" > /dev/null; then echo "Already exists" && exit 1; else echo "Desn't exist" && exit 0; fi
|
||||
if curl --silent -f -lSL "https://hub.docker.com/v2/repositories/jiriks74/onlyoffice-documentserver/tags/$(echo ${{ steps.meta.outputs.tag }})" > /dev/null; then echo "Already exists" && exit 0; else echo "Desn't exist" && exit 0; fi
|
||||
|
||||
- name: Set tag in Dockerfile
|
||||
run: |
|
||||
sed -i "s/ARG PACKAGE_VERSION=/ARG PACKAGE_VERSION=$(echo ${{ steps.meta.outputs.tag }} | cut -d ':' -f2)/g" Dockerfile
|
||||
|
||||
- name: Install Docker
|
||||
uses: awalsh128/cache-apt-pkgs-action@latest
|
||||
with:
|
||||
packages: docker.io
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
with:
|
||||
platforms: linux/amd64,linux/arm64
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
|
Loading…
x
Reference in New Issue
Block a user