-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* move all logic to separate function so we can test that later * split `step.Shell` and `step.WorkingDirectory` setup into own funcs * general cleanup of function * use `ActPath` to not collide with checked out repository * use `shellquote.Split()` instead of `strings.Fields()` for better command split * replace single string concat with `fmt` Signed-off-by: hackercat <me@hackerc.at>
- Loading branch information
hackercat
committed
Dec 16, 2021
1 parent
fec0c0c
commit b0766d6
Showing
8 changed files
with
165 additions
and
78 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
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
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,14 @@ | ||
on: push | ||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# prints version and exits, it's not valid (for github) if {0} is not included | ||
- shell: pwsh -v '. {0}' | ||
run: '' | ||
check-container: | ||
runs-on: ubuntu-latest | ||
container: ghcr.io/justingrote/act-pwsh:latest | ||
steps: | ||
- shell: pwsh -v '. {0}' | ||
run: '' |
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,15 +1,25 @@ | ||
on: push | ||
env: | ||
MY_SHELL: pwsh | ||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- shell: pwsh | ||
- shell: ${{ env.MY_SHELL }} | ||
run: | | ||
$PSVersionTable | ||
check-container: | ||
runs-on: ubuntu-latest | ||
container: ghcr.io/justingrote/act-pwsh:latest | ||
steps: | ||
- shell: pwsh | ||
- shell: ${{ env.MY_SHELL }} | ||
run: | | ||
$PSVersionTable | ||
check-job-default: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: ${{ env.MY_SHELL }} | ||
steps: | ||
- run: | | ||
$PSVersionTable |
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,17 +1,28 @@ | ||
on: push | ||
env: | ||
MY_SHELL: python | ||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- shell: python | ||
- shell: ${{ env.MY_SHELL }} | ||
run: | | ||
import platform | ||
print(platform.python_version()) | ||
check-container: | ||
runs-on: ubuntu-latest | ||
container: node:12-buster | ||
steps: | ||
- shell: python | ||
- shell: ${{ env.MY_SHELL }} | ||
run: | | ||
import platform | ||
print(platform.python_version()) | ||
check-job-default: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: ${{ env.MY_SHELL }} | ||
steps: | ||
- run: | | ||
import platform | ||
print(platform.python_version()) |
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