feat(ci): update Gitea workflow to include registry login and cache handling adjustments
This commit is contained in:
@@ -6,6 +6,9 @@ on:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
env:
|
||||
REGISTRY: git.arthurerlich.de
|
||||
|
||||
jobs:
|
||||
build-dev:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -16,6 +19,16 @@ jobs:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
# type=gha depends on act_runner's internal cache proxy, which is unreachable
|
||||
# from job containers on this runner (dial tcp ... i/o timeout). Use the
|
||||
# registry cache backend instead, same as docker-publish.yml.
|
||||
- name: Log in to Gitea registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ gitea.actor }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
- name: Build dev image (PHP 8.4 + composer deps)
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
@@ -24,8 +37,8 @@ jobs:
|
||||
target: dev
|
||||
outputs: type=docker,dest=/tmp/graph-dev.tar
|
||||
tags: graph-dev:ci
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ gitea.repository }}:buildcache-dev
|
||||
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ gitea.repository }}:buildcache-dev,mode=max
|
||||
|
||||
- name: Upload dev image
|
||||
uses: actions/upload-artifact@v4
|
||||
|
||||
Reference in New Issue
Block a user