From 00ea25f9fbc819ca3262b76bacade1f31a58bdf9 Mon Sep 17 00:00:00 2001 From: Ben Vincent Date: Sun, 1 Dec 2024 21:56:19 +1100 Subject: [PATCH] feat: testing previous run id --- .gitea/workflows/build.yaml | 40 ++++++++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 9dd05ec..0754708 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -16,16 +16,42 @@ jobs: - name: Checkout code uses: actions/checkout@v3 - - name: Build Packages + - name: Print env run: | - make all + env + + - name: Get Current Run ID + run: | + echo "Current Run ID: $GITHUB_RUN_NUMBER" + + - name: Calculate Previous Run ID + id: calculate_previous_run + run: | + PREVIOUS_RUN_ID=$((GITHUB_RUN_NUMBER - 1)) + echo "Previous Run ID: $PREVIOUS_RUN_ID" + echo "::set-output name=previous_run_id::$PREVIOUS_RUN_ID" + + - name: Download artifact + id: download-artifact + uses: dawidd6/action-download-artifact@v6 + with: + workflow: build.yaml + workflow_search: false + workflow_conclusion: completed + run_id: $PREVIOUS_RUN_ID + name: rpm + path: /workspace/unkin/rpmbuilder/dist + search_artifacts: true + #- name: Build Packages + # run: | + # make all - name: Show RPMs run: | find /workspace -type f -name "*.rpm" - - name: Upload Artifacts - uses: actions/upload-artifact@v3 - with: - name: rpms - path: /workspace/unkin/rpmbuilder/dist/*/*.rpm + #- name: Upload Artifacts + # uses: actions/upload-artifact@v3 + # with: + # name: rpms + # path: /workspace/unkin/rpmbuilder/dist/*/*.rpm