From ca67b6d2e836921838030b3d2de36d28f5341431 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Tue, 5 Nov 2024 12:02:38 +0900 Subject: [PATCH] Repo shaping --- .github/workflows/build_artifacts.yml | 6 ++---- .github/workflows/pr_from_upstream.yml | 2 +- workflow_templates/build-artifacts.yml | 23 ++++++++++++----------- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build_artifacts.yml b/.github/workflows/build_artifacts.yml index 9d7643a..730ce0b 100644 --- a/.github/workflows/build_artifacts.yml +++ b/.github/workflows/build_artifacts.yml @@ -9,9 +9,7 @@ on: workflow_dispatch: env: - RUNNER_TAG: ${{ env.RUNNER_TAG || 'ubuntu-latest' }} DATE: ${{ github.run_id }} - MANIFEST_FILENAME: ${{ env.MANIFEST_FILENAME || '' }} jobs: @@ -27,7 +25,7 @@ jobs: Building-project: needs: Check-variables - runs-on: ${{ env.RUNNER_TAG }} + runs-on: ubuntu-latest steps: - name: Clone repo @@ -37,7 +35,7 @@ jobs: token: ${{ secrets.TRIGGER_BUILD_TOKEN }} - name: "Install dependencies" - uses: RetroDECK/components-template/.github/workflows/install_dependencies.yml@main + uses: .github/workflows/build_artifacts.yml - name: "Assembling manifest" if: ${{ env.DYNAMIC_MANIFEST == 'true' }} diff --git a/.github/workflows/pr_from_upstream.yml b/.github/workflows/pr_from_upstream.yml index 5e2bdb5..74d92cc 100644 --- a/.github/workflows/pr_from_upstream.yml +++ b/.github/workflows/pr_from_upstream.yml @@ -50,7 +50,7 @@ jobs: echo "No changes to push." fi - - name: Create Pull Request + - name: Create Pull Request if: success() && steps.push.outputs.BRANCH_NAME != '' # Only run if there are changes uses: peter-evans/create-pull-request@v4 with: diff --git a/workflow_templates/build-artifacts.yml b/workflow_templates/build-artifacts.yml index 7ec815a..c37ca3a 100644 --- a/workflow_templates/build-artifacts.yml +++ b/workflow_templates/build-artifacts.yml @@ -3,18 +3,19 @@ name: "Build Artifacts for RetroDECK main manifest" on: push: branches: - - master - - main + - master + - main workflow_call: +env: + MANIFEST_FILENAME: "name.manifest.manifest.yaml" + jobs: - Building-project: - runs-on: ubuntu-latest + install-dependencies: + uses: RetroDECK/components-template/.github/workflows/install_dependencies.yml@main - steps: - - - name: "Install dependencies" - uses: RetroDECK/components-template/.github/workflows/install_dependencies.yml@main - - - name: "Build project" - uses: RetroDECK/components-template/.github/workflows/build_artifacts.yml@main \ No newline at end of file + build-project: + needs: install-dependencies # Ensures this job only runs after install-dependencies + uses: RetroDECK/components-template/.github/workflows/build_artifacts.yml@main + with: + MANIFEST_FILENAME: ${{ env.MANIFEST_FILENAME }} \ No newline at end of file