Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions .github/workflows/pr-build-test-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,14 @@ jobs:
path: ${{ runner.temp }}/build.tar

# This is stupid, but GHA currently zeros out the pull_requests list in forked repos
# so we have no way to get at this number without going through PRs and matching via hash
- name: Save PR Number to disk
if: github.event.workflow_run.event == 'pull_request'
run: echo "${{ github.event.number }}" > pr_number.txt
# so we have no way to get at this without going through PRs and matching via hash
- name: Save buildpath to disk
run: echo "${{ steps.build-path.outputs.build }}" > build_path.txt

- uses: actions/upload-artifact@v4
if: github.event.workflow_run.event == 'pull_request'
with:
name: ${{ github.run_id }}-number
path: pr_number.txt
name: ${{ github.run_id }}-path
path: build_path.txt


check-no-modified-translations:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-deploy-container-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
- name: Add comment
uses: thollander/actions-comment-pull-request@v3
with:
pr-number: ${{ github.event.workflow_run.pull_requests[0].number }}
pr-number: ${{ env.PR_NUMBER }}
comment-tag: container-image
message: |
Use `docker` or `podman` to test this pull request locally.
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/pr-deploy-test-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,17 @@ jobs:
github-token: ${{ github.token }}
run-id: ${{ github.event.workflow_run.id }}

- name: Fetch pr number from GHA
- name: Fetch build path from GHA
uses: actions/download-artifact@v4
with:
name: ${{ github.event.workflow_run.id }}-number
name: ${{ github.event.workflow_run.id }}-path
github-token: ${{ github.token }}
run-id: ${{ github.event.workflow_run.id }}

- name: Read PR Number
- name: Read PR Number and build path
run: |
echo "PR_NUMBER=$(cat pr_number.txt)" >> $GITHUB_ENV
echo "BUILD_PATH=$(cat build_path.txt)" >> $GITHUB_ENV
echo "PR_NUMBER=$(cat build_path.txt | cut -f 1 -d '/')" >> $GITHUB_ENV

- name: Store build in the clone
run: |
Expand Down Expand Up @@ -86,7 +87,7 @@ jobs:
working-directory: admin-interface-test
run: |
git add .
git commit --amend -m "Build ${{ github.event.workflow_run.pull_requests[0].number }}"
git commit --amend -m "Build ${{ env.BUILD_PATH }}"

- name: Force push admin interface test branch
working-directory: admin-interface-test
Expand All @@ -100,7 +101,7 @@ jobs:
comment-tag: static-test-deployment
message: >
This pull request is deployed at
[test.admin-interface.opencast.org/${{ steps.build-path.outputs.build }}
](https://test.admin-interface.opencast.org/${{ steps.build-path.outputs.build }}).
[test.admin-interface.opencast.org/${{ env.BUILD_PATH }}
](https://test.admin-interface.opencast.org/${{ env.BUILD_PATH }}).

It might take a few minutes for it to become available.
Loading