-
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.
Merge pull request #7 from BSekula/test6
Test6
- Loading branch information
Showing
3 changed files
with
47 additions
and
20 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 |
---|---|---|
@@ -1,34 +1,41 @@ | ||
name: Create Artefacts | ||
name: Create artifacts | ||
|
||
on: [pull_request] | ||
on: [pull_request, push] | ||
|
||
jobs: | ||
create-artefacts: | ||
create-artifacts: | ||
runs-on: ubuntu-latest | ||
name: Create artefact | ||
name: Create artifact | ||
env: | ||
tag: v3.0.0 | ||
steps: | ||
- run: echo $tag | ||
- uses: actions/checkout@v3 | ||
- run: mkdir -p path/to/artifact | ||
- run: echo ${{github.sha}} > path/to/artifact/world.txt | ||
- run: echo $tag > path/to/artifact/artifact1-$tag.txt | ||
- run: echo $tag > path/to/artifact/artifact2-$tag.txt | ||
- run: ls -al path/to/artifact | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: my-artifact | ||
path: path/to/artifact/world.txt | ||
name: my-artifact-${{env.tag}} | ||
path: path/to/artifact/ | ||
|
||
test-artefact: | ||
name: Test artefacts | ||
test-artifact: | ||
name: Test artifacts | ||
runs-on: ubuntu-latest | ||
needs: [create-artefacts] | ||
needs: [create-artifacts] | ||
env: | ||
tag: v3.0.0 | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: my-artifact | ||
name: my-artifact-${{env.tag}} | ||
path: path/to/artifact | ||
|
||
- name: Display structure of downloaded files | ||
run: ls -R | ||
working-directory: path/to/artifact | ||
|
||
- name: Show text artefact | ||
run: cat world.txt | ||
- name: Show text artifact | ||
run: cat artifact1-${{env.tag}}.txt | ||
working-directory: path/to/artifact |
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
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,19 @@ | ||
{ | ||
"name": "github-action-tests", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/BSekula/github-actions-test.git" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/BSekula/github-actions-test/issues" | ||
}, | ||
"homepage": "https://github.com/BSekula/github-actions-test#readme" | ||
} |