-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PTFE-1271 handle proper sha on pull_request events
- Loading branch information
Showing
4 changed files
with
62 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
on: pull_request | ||
|
||
name: Test pull request | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
environment: production | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: create file to upload | ||
run: | | ||
mkdir -p artifacts | ||
echo "Hello world" > artifacts/file1.txt | ||
- name: Push all files | ||
uses: ./ | ||
id: artifacts | ||
with: | ||
url: ${{ vars.ARTIFACTS_URL }} | ||
user: ${{ secrets.ARTIFACTS_USER }} | ||
password: ${{ secrets.ARTIFACTS_PASSWORD }} | ||
source: ./artifacts | ||
method: upload | ||
- name: Test results | ||
run: | | ||
SHA=${{ github.event.pull_request.head.sha }} | ||
SHORTSHA=${SHA::10} | ||
# We expect SHORTSHA to be in the name of the artifact | ||
if [[ ${ARTIFACTS_NAME} != *${SHORTSHA}* ]]; then | ||
echo "Artifact name ${ARTIFACT_NAME} does not contain the short SHA" | ||
exit 1 | ||
fi | ||
env: | ||
ARTIFACTS_NAME: ${{ steps.artifacts.outputs.name }} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters