mirror of
https://github.com/GTNewHorizons/GTNH-Actions-Workflows.git
synced 2026-10-16 12:27:28 +02:00
Full Pack tests against latest daily w. dependency-aware actions (#66)
Co-authored-by: UltraProdigy <187078471+UltraProdigy@users.noreply.github.com>
This commit is contained in:
@@ -46,6 +46,11 @@ on:
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
external-deps-inclusion:
|
||||
description: 'Enable usage of external dependency artifacts that might have been provided by trigger-rebuild-with-deps (if installed)'
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
@@ -72,6 +77,37 @@ jobs:
|
||||
path: .gtnh-workflows
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Find external-deps artifact for this run
|
||||
id: find-artifact
|
||||
if: ${{ inputs.external-deps-inclusion }}
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
# The artifact is named after this run's ID because try-rebuild-with-deps runs in the
|
||||
# master context; filtering by head_sha would never match the PR's SHA (I tried).
|
||||
# Reruns keep the same run_id, so this name is stable across attempts.
|
||||
RUN_ID=$(gh api \
|
||||
"repos/${{ github.repository }}/actions/artifacts?name=external-deps-${{ github.run_id }}" \
|
||||
--jq ".artifacts[0].workflow_run.id // empty")
|
||||
echo "run_id=$RUN_ID" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Download external deps
|
||||
if: ${{ inputs.external-deps-inclusion && steps.find-artifact.outputs.run_id != '' }}
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
name: external-deps-${{ github.run_id }}
|
||||
path: ./.packscripts/
|
||||
run-id: ${{ steps.find-artifact.outputs.run_id }}
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Install external deps to local maven
|
||||
if: ${{ inputs.external-deps-inclusion && hashFiles('./.packscripts/**') != '' }}
|
||||
run: |
|
||||
echo "Aquired build artifacts from rebuild job: " && ls -lahR ./.packscripts/
|
||||
bash .gtnh-workflows/scripts/upload-deps-to-localmaven.sh ./.packscripts/required_prs.json
|
||||
echo "Overriding dependencies of project with versions from local maven:" && cat ~/.gradle/init.gradle
|
||||
echo "Contents of local maven:" && ls -lahR ~/.m2/repository/com/github
|
||||
|
||||
- name: Determine JDK versions
|
||||
id: list-jdk-versions
|
||||
shell: bash
|
||||
|
||||
Reference in New Issue
Block a user