Use local build cache.
This commit is contained in:
parent
59b5a6da7f
commit
f74e316ac0
|
@ -133,7 +133,7 @@ jobs:
|
||||||
tags: ghcr.io/azuracast/azuracast:latest
|
tags: ghcr.io/azuracast/azuracast:latest
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
cache-from: type=registry,ref=ghcr.io/azuracast/azuracast:buildcache
|
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
|
- name: Load Web Image for Testing
|
||||||
uses: docker/build-push-action@v3
|
uses: docker/build-push-action@v3
|
||||||
|
@ -141,7 +141,7 @@ jobs:
|
||||||
context: .
|
context: .
|
||||||
load: true
|
load: true
|
||||||
tags: ghcr.io/azuracast/azuracast:latest
|
tags: ghcr.io/azuracast/azuracast:latest
|
||||||
cache-from: type=gha
|
cache-from: type=local,src=/tmp/docker_image
|
||||||
|
|
||||||
- name: Set up functional test environment.
|
- name: Set up functional test environment.
|
||||||
run: |
|
run: |
|
||||||
|
@ -160,56 +160,16 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
docker-compose down
|
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
|
- name: Login to DockerHub
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
|
if: github.event_name == 'push' || github.event_name == 'schedule'
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Login to GitHub Container Registry
|
- name: Login to GitHub Container Registry
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
|
if: github.event_name == 'push' || github.event_name == 'schedule'
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.repository_owner }}
|
||||||
|
@ -218,6 +178,7 @@ jobs:
|
||||||
- name: Build Docker Metadata
|
- name: Build Docker Metadata
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v4
|
uses: docker/metadata-action@v4
|
||||||
|
if: github.event_name == 'push' || github.event_name == 'schedule'
|
||||||
with:
|
with:
|
||||||
images: |
|
images: |
|
||||||
azuracast/azuracast
|
azuracast/azuracast
|
||||||
|
@ -229,11 +190,12 @@ jobs:
|
||||||
|
|
||||||
- name: Publish to Docker Hub
|
- name: Publish to Docker Hub
|
||||||
uses: docker/build-push-action@v3
|
uses: docker/build-push-action@v3
|
||||||
|
if: github.event_name == 'push' || github.event_name == 'schedule'
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
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
|
cache-to: type=registry,ref=ghcr.io/azuracast/azuracast:buildcache,mode=max
|
||||||
|
|
Loading…
Reference in New Issue