Update action to match with forgejo needs

This commit is contained in:
Marc Di Luzio 2024-08-25 16:30:50 +01:00
parent dc14d48d20
commit c1bcbeeab7

View file

@ -19,13 +19,13 @@ jobs:
# Run the tests scripts # Run the tests scripts
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v4 - uses: https://github.com/actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: https://github.com/actions/setup-python@v5
with: with:
python-version: 3.11 python-version: 3.11
cache: pip cache: pip
@ -39,7 +39,7 @@ jobs:
# Build and push the docker images # Build and push the docker images
build-and-push-images: build-and-push-images:
runs-on: ubuntu-latest runs-on: ubuntu-22.04
needs: test needs: test
permissions: permissions:
@ -50,15 +50,15 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: https://github.com/actions/checkout@v4
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v3 uses: https://github.com/docker/setup-qemu-action@v3
with: with:
platforms: arm32v7/armhf # arm64v8/aarch64 - no current need for arm64 platforms: arm32v7/armhf # arm64v8/aarch64 - no current need for arm64
- name: Log in to the Container registry - name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 uses: https://github.com/docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with: with:
registry: ${{ env.REGISTRY }} registry: ${{ env.REGISTRY }}
username: ${{ github.actor }} username: ${{ github.actor }}
@ -72,7 +72,7 @@ jobs:
- name: Extract metadata (tags, labels) for Docker - name: Extract metadata (tags, labels) for Docker
id: meta id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 uses: https://github.com/docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with: with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: | tags: |
@ -83,7 +83,7 @@ jobs:
- name: Build and push Docker image - name: Build and push Docker image
id: push id: push
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 uses: https://github.com/docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with: with:
context: . context: .
platforms: linux/arm/v7,linux/amd64 # linux/arm64 no current need for arm64 platforms: linux/arm/v7,linux/amd64 # linux/arm64 no current need for arm64
@ -95,7 +95,7 @@ jobs:
cache-to: type=gha,mode=max cache-to: type=gha,mode=max
- name: Generate artifact attestation - name: Generate artifact attestation
uses: actions/attest-build-provenance@v1 uses: https://github.com/actions/attest-build-provenance@v1
with: with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}} subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.push.outputs.digest }} subject-digest: ${{ steps.push.outputs.digest }}