Use local build cache.
This commit is contained in:
parent
59b5a6da7f
commit
f74e316ac0
|
@ -133,7 +133,7 @@ jobs:
|
|||
tags: ghcr.io/azuracast/azuracast:latest
|
||||
platforms: linux/amd64,linux/arm64
|
||||
cache-from: type=registry,ref=ghcr.io/azuracast/azuracast:buildcache
|
||||
cache-to: type=gha,mode=max
|
||||
cache-to: type=local,dest=/tmp/docker_image,mode=max
|
||||
|
||||
- name: Load Web Image for Testing
|
||||
uses: docker/build-push-action@v3
|
||||
|
@ -141,7 +141,7 @@ jobs:
|
|||
context: .
|
||||
load: true
|
||||
tags: ghcr.io/azuracast/azuracast:latest
|
||||
cache-from: type=gha
|
||||
cache-from: type=local,src=/tmp/docker_image
|
||||
|
||||
- name: Set up functional test environment.
|
||||
run: |
|
||||
|
@ -160,56 +160,16 @@ jobs:
|
|||
run: |
|
||||
docker-compose down
|
||||
|
||||
- name: Echo test output directory
|
||||
if: failure()
|
||||
run: |
|
||||
docker-compose logs
|
||||
cat tests/_output/*
|
||||
|
||||
- name: Upload built static assets and translations
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: assets
|
||||
if-no-files-found: error
|
||||
path: |
|
||||
.gitinfo
|
||||
translations
|
||||
web/static/dist
|
||||
web/static/webpack_dist
|
||||
web/static/webpack.json
|
||||
web/static/assets.json
|
||||
web/static/api/openapi.yml
|
||||
|
||||
publish:
|
||||
name: Publish
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'push' || github.event_name == 'schedule'
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
|
||||
- name: Download built static assets from previous step
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: assets
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
id: qemu
|
||||
with:
|
||||
platforms: arm64
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v2
|
||||
if: github.event_name == 'push' || github.event_name == 'schedule'
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
if: github.event_name == 'push' || github.event_name == 'schedule'
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
|
@ -218,6 +178,7 @@ jobs:
|
|||
- name: Build Docker Metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
if: github.event_name == 'push' || github.event_name == 'schedule'
|
||||
with:
|
||||
images: |
|
||||
azuracast/azuracast
|
||||
|
@ -229,11 +190,12 @@ jobs:
|
|||
|
||||
- name: Publish to Docker Hub
|
||||
uses: docker/build-push-action@v3
|
||||
if: github.event_name == 'push' || github.event_name == 'schedule'
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=gha
|
||||
cache-from: type=local,src=/tmp/docker_image
|
||||
cache-to: type=registry,ref=ghcr.io/azuracast/azuracast:buildcache,mode=max
|
||||
|
|
Loading…
Reference in New Issue