ci: run workflow on pull requests and expire artifacts after 1 day #1

Merged
Sluijsens merged 2 commits from feature/updates_gitea_workflow into master 2026-07-23 23:45:15 +02:00
+16 -8
View File
@@ -1,14 +1,21 @@
name: Build, Test and Package Release name: Build, Test and Package Release
# Manually triggered pipeline (see aidlc-docs/features/react-frontend/operations/deployment/deployment-instructions.md): # Pipeline (see aidlc-docs/features/react-frontend/operations/deployment/deployment-instructions.md):
# - Run it yourself from Gitea Actions, picking the branch/ref to run against. # - Runs automatically on every pull request (merge request) as a build/test/lint gate.
# - Always runs the build/test/lint gate first. # - Can also be triggered manually from Gitea Actions, picking the branch/ref to run against.
# - The "deploy" step currently only packages dist/ as a downloadable artifact # - The "deploy" job currently only packages dist/ as a downloadable artifact
# (no automatic upload to a host yet). Typically run on a `release/*` branch # (no automatic upload to a host yet) and only runs for manual (workflow_dispatch) runs.
# once you've manually created it for a release. # Typically run on a `release/*` branch once you've manually created it for a release.
# - Uploaded artifacts expire after 1 day (retention-days: 1).
# - Gitea Actions has no GitLab/Azure DevOps-style approval gate (a single job with a
# "manual" play button inside an already-running pipeline). The closest equivalent is
# workflow_dispatch: the deploy job only runs when someone presses "Run workflow" in
# the Gitea Actions UI, i.e. a one-click manual approval.
on: on:
workflow_dispatch: {} workflow_dispatch: {}
pull_request:
types: [opened, synchronize, reopened]
jobs: jobs:
build-and-test: build-and-test:
@@ -44,10 +51,11 @@ jobs:
with: with:
name: dist name: dist
path: dist/ path: dist/
retention-days: 30 retention-days: 1
deploy: deploy:
needs: build-and-test needs: build-and-test
if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Download build artifact - name: Download build artifact
@@ -65,4 +73,4 @@ jobs:
with: with:
name: release-dist name: release-dist
path: dist/ path: dist/
retention-days: 30 retention-days: 1