fix: correct Gitea Actions syntax in CI workflow
This commit is contained in:
@@ -13,7 +13,7 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: gitea
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -33,7 +33,7 @@ jobs:
|
|||||||
run: uv run pytest
|
run: uv run pytest
|
||||||
|
|
||||||
docker-push:
|
docker-push:
|
||||||
runs-on: ubuntu-latest
|
runs-on: gitea
|
||||||
needs: test
|
needs: test
|
||||||
if: gitea.event_name == 'push'
|
if: gitea.event_name == 'push'
|
||||||
steps:
|
steps:
|
||||||
@@ -50,11 +50,8 @@ jobs:
|
|||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: ${{ env.REGISTRY }}
|
registry: ${{ env.REGISTRY }}
|
||||||
username: ${{ secrets.DOCKER_REGISTRY_USER }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_REGISTRY_TOKEN }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
- name: Extract commit SHA
|
|
||||||
run: echo "SHA=${GITEA_SHA:0:7}" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Build and push multi-arch image
|
- name: Build and push multi-arch image
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
@@ -63,7 +60,7 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
tags: |
|
tags: |
|
||||||
${{ env.IMAGE_NAME }}:${{ env.SHA }}
|
${{ env.IMAGE_NAME }}:${{ gitea.sha }}
|
||||||
${{ env.IMAGE_NAME }}:latest
|
${{ env.IMAGE_NAME }}:latest
|
||||||
cache-from: type=registry,ref=${{ env.IMAGE_NAME }}:latest
|
cache-from: type=registry,ref=${{ env.IMAGE_NAME }}:latest
|
||||||
cache-to: type=registry,ref=${{ env.IMAGE_NAME }}:latest,mode=max
|
cache-to: type=registry,ref=${{ env.IMAGE_NAME }}:latest,mode=max
|
||||||
|
|||||||
Reference in New Issue
Block a user