-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
72 additions
and
0 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,17 @@ | ||
name: Full Deployment | ||
on: | ||
repository_dispatch: | ||
types: [test_workflows] | ||
|
||
concurrency: | ||
group: ci-test_workflows-runner | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test-create: | ||
name: Create | ||
uses: ./.github/workflows/test/create-upload.yaml | ||
test-verify: | ||
needs: test-create | ||
name: Test | ||
uses: ./.github/workflows/test/download-verify.yaml |
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,20 @@ | ||
name: Create and Upload Artifact | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
create-file: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Create a text file with "Hello World" | ||
run: echo "Hello World" > hello.txt | ||
|
||
- name: Upload hello.txt as an artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: hello-world-file | ||
path: hello.txt |
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 @@ | ||
name: Download and Verify Artifact | ||
|
||
on: | ||
workflow_dispatch: | ||
workflow_run: | ||
workflows: ["Create and Upload Artifact"] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
verify-file: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download artifact from previous workflow | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: hello-world-file | ||
path: ./artifact | ||
|
||
- name: Check if the file exists | ||
run: | | ||
if [ ! -f ./artifact/hello.txt ]; then | ||
echo "File not found!" | ||
exit 1 | ||
fi | ||
- name: Verify file contents | ||
run: | | ||
FILE_CONTENT=$(cat ./artifact/hello.txt) | ||
if [ "$FILE_CONTENT" != "Hello World" ]; then | ||
echo "File contents do not match!" | ||
exit 1 | ||
else | ||
echo "File contents verified successfully: $FILE_CONTENT" | ||
fi |