update gitea docker workflow for environment compatibility and registry caching
Switch to GITEA_OUTPUT and transition Docker caching from type=gha to type=registry to better support the Gitea Actions environment. The runner is also pinned to ubuntu-24.04 for consistency.
This commit is contained in:
@@ -9,7 +9,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push:
|
build-and-push:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-24.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -20,8 +20,8 @@ jobs:
|
|||||||
id: reg
|
id: reg
|
||||||
run: |
|
run: |
|
||||||
host=$(echo "${{ gitea.server_url }}" | sed 's|https://||;s|http://||;s|/||g')
|
host=$(echo "${{ gitea.server_url }}" | sed 's|https://||;s|http://||;s|/||g')
|
||||||
echo "host=$host" >> $GITHUB_OUTPUT
|
echo "host=$host" >> $GITEA_OUTPUT
|
||||||
echo "image=$host/${{ gitea.repository }}" >> $GITHUB_OUTPUT
|
echo "image=$host/${{ gitea.repository }}" >> $GITEA_OUTPUT
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
@@ -51,5 +51,5 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
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=registry,ref=${{ steps.reg.outputs.image }}:cache
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=registry,ref=${{ steps.reg.outputs.image }}:cache,mode=max
|
||||||
|
|||||||
Reference in New Issue
Block a user