diff --git a/.forgejo/test-and-publish.yml b/.forgejo/workflows/test-and-publish.yml similarity index 54% rename from .forgejo/test-and-publish.yml rename to .forgejo/workflows/test-and-publish.yml index 363f363..ba0f211 100644 --- a/.forgejo/test-and-publish.yml +++ b/.forgejo/workflows/test-and-publish.yml @@ -14,20 +14,20 @@ env: REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository }} - + jobs: # Run the tests scripts test: runs-on: ubuntu-22.04 steps: - - uses: https://github.com/actions/checkout@v4 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python - uses: https://github.com/actions/setup-python@v5 + uses: actions/setup-python@v5 with: - python-version: 3.11 + python-version: 3.12 cache: pip - name: Install dependencies run: | @@ -50,29 +50,21 @@ jobs: steps: - name: Checkout repository - uses: https://github.com/actions/checkout@v4 + uses: actions/checkout@v4 - - name: Set up QEMU - uses: https://github.com/docker/setup-qemu-action@v3 - with: - platforms: arm32v7/armhf # arm64v8/aarch64 - no current need for arm64 - - name: Log in to the Container registry - uses: https://github.com/docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 + uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + password: ${{ secrets.GH_PAT }} - # Use docker-container driver for multi-platform builds - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - with: - driver: docker-container - name: Extract metadata (tags, labels) for Docker id: meta - uses: https://github.com/docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 + uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | @@ -83,21 +75,9 @@ jobs: - name: Build and push Docker image id: push - uses: https://github.com/docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 + uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 with: context: . - platforms: linux/arm/v7,linux/amd64 # linux/arm64 no current need for arm64 push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - # Cache to help the step run a little faster - cache-from: type=gha - cache-to: type=gha,mode=max - - - name: Generate artifact attestation - uses: https://github.com/actions/attest-build-provenance@v1 - with: - subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}} - subject-digest: ${{ steps.push.outputs.digest }} - push-to-registry: true -