name: Build, test and publish on: push: branches: ['**'] jobs: verify: runs-on: agiledancers-mini-pc env: CI: 'true' TARGET_PLATFORM: ${{ vars.TARGET_PLATFORM }} GITEA_SERVER_URL: ${{ gitea.server_url }} CI_REPOSITORY: ${{ gitea.repository }} CI_COMMIT: ${{ gitea.sha }} CI_REF: ${{ gitea.ref }} CI_RUN_ID: ${{ gitea.run_id }} CI_RUN_ATTEMPT: ${{ gitea.run_attempt }} steps: - name: Check out pushed commit uses: https://github.com/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: persist-credentials: false - name: Build and test both images run: timeout --signal=TERM --kill-after=60s 75m bash ci/verify.sh - name: Publish verified main images if: success() && gitea.ref == 'refs/heads/main' env: REGISTRY_USER: ${{ secrets.REGISTRY_USER }} REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }} run: timeout --signal=TERM --kill-after=60s 15m bash ci/publish.sh - name: Collect diagnostics and clean up test containers if: always() run: bash ci/cleanup.sh - name: Retain diagnostics for fourteen days if: always() uses: https://github.com/actions/upload-artifact@ff15f0306b3f739f7b6fd43fb5d26cd321bd4de5 with: name: diagnostics-${{ gitea.run_id }}-${{ gitea.run_attempt }} path: ci/artifacts/ if-no-files-found: error retention-days: 14