Compare commits
1 Commits
fix-valida
...
9b1d03ef7d
| Author | SHA1 | Date | |
|---|---|---|---|
| 9b1d03ef7d |
@@ -29,44 +29,12 @@ jobs:
|
||||
- name: Run tests
|
||||
run: uv run pytest
|
||||
|
||||
docker-push:
|
||||
docker-build:
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
if: gitea.event_name == 'push'
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Compute image metadata
|
||||
id: meta
|
||||
env:
|
||||
DOCKER_REGISTRY: ${{ secrets.DOCKER_REGISTRY }}
|
||||
GITEA_REPOSITORY: ${{ gitea.repository }}
|
||||
run: |
|
||||
IMAGE="${DOCKER_REGISTRY}/$(printf '%s' "$GITEA_REPOSITORY" | tr '[:upper:]' '[:lower:]')"
|
||||
echo "image=$IMAGE" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Log in to Gitea container registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ secrets.DOCKER_REGISTRY }}
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build and push multi-arch image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: |
|
||||
${{ steps.meta.outputs.image }}:${{ gitea.sha }}
|
||||
${{ steps.meta.outputs.image }}:latest
|
||||
cache-from: type=registry,ref=${{ steps.meta.outputs.image }}:latest
|
||||
cache-to: type=registry,ref=${{ steps.meta.outputs.image }}:latest,mode=max
|
||||
- name: Build Docker image
|
||||
run: docker build -t shopping-list-api:${{ gitea.sha }} .
|
||||
|
||||
Reference in New Issue
Block a user