diff --git a/.gitea/workflows/build-feature.yml b/.gitea/workflows/build-feature.yml index 1b14ff7..f826b91 100644 --- a/.gitea/workflows/build-feature.yml +++ b/.gitea/workflows/build-feature.yml @@ -2,6 +2,9 @@ name: Build Feature on: workflow_call: inputs: + env_json: + required: true + type: string bats-image: required: true type: string @@ -15,6 +18,9 @@ on: required: true env: + GITEA_API_URL: ${{ fromJson(inputs.env_json).GITEA_API_URL }} + PAGES_HOST: ${{ fromJson(inputs.env_json).PAGES_HOST }} + GIT_PAGES_PUBLISH_URL: ${{ fromJson(inputs.env_json).GIT_PAGES_PUBLISH_URL }} GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} GIT_PAGES_PUBLISH_TOKEN: ${{ secrets.GIT_PAGES_PUBLISH_TOKEN }} @@ -33,7 +39,6 @@ jobs: bats: runs-on: ubuntu-latest - needs: validate steps: - uses: actions/checkout@v4 - uses: actions/checkout@v4 @@ -41,9 +46,6 @@ jobs: repository: niko/gitea-ci-library path: .ci - - name: Load env - run: grep -v '^#' .gitea/workflows/feature-env.conf >> "$GITHUB_ENV" - - name: Run bats tests id: bats-tests shell: bash @@ -78,7 +80,6 @@ jobs: cucumber: runs-on: ubuntu-latest - needs: validate container: image: ${{ inputs.cucumber-node-image }} steps: @@ -88,9 +89,6 @@ jobs: repository: niko/gitea-ci-library path: .ci - - name: Load env - run: grep -v '^#' .gitea/workflows/feature-env.conf >> "$GITHUB_ENV" - - name: Prepare cucumber id: prepare-cucumber shell: bash @@ -149,9 +147,6 @@ jobs: repository: niko/gitea-ci-library path: .ci - - name: Load env - run: grep -v '^#' .gitea/workflows/feature-env.conf >> "$GITHUB_ENV" - - name: Generate report index run: bash .ci/.gitea/scripts/generate-report-index.sh diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 436b897..e551a05 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -5,18 +5,27 @@ on: workflow_dispatch: jobs: + load-config: + uses: niko/gitea-ci-library/.gitea/workflows/config-provider.yml@feature/pipeline-cleanup + with: + config_path: .gitea/workflows/feature-env.conf + feature: if: github.ref != 'refs/heads/main' + needs: [load-config] uses: niko/gitea-ci-library/.gitea/workflows/build-feature.yml@feature/pipeline-cleanup secrets: inherit with: + env_json: ${{ needs.load-config.outputs.env_json }} bats-image: bats/bats:latest cucumber-node-image: node:22 main: if: github.ref == 'refs/heads/main' + needs: [load-config] uses: niko/gitea-ci-library/.gitea/workflows/build-feature.yml@feature/pipeline-cleanup secrets: inherit with: + env_json: ${{ needs.load-config.outputs.env_json }} bats-image: bats/bats:latest cucumber-node-image: node:22