2020-02-10 17:27:05 -06:00
|
|
|
name: local-action-dockerfile
|
|
|
|
on: push
|
2021-12-22 13:19:50 -06:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
2020-02-10 17:27:05 -06:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-06-10 10:28:23 -05:00
|
|
|
- uses: actions/checkout@v2
|
2020-02-10 17:27:05 -06:00
|
|
|
- uses: ./actions/docker-local
|
2021-11-12 17:21:18 -06:00
|
|
|
id: dockerlocal
|
2020-02-10 17:27:05 -06:00
|
|
|
with:
|
|
|
|
who-to-greet: 'Mona the Octocat'
|
2021-09-24 08:32:22 -05:00
|
|
|
- run: '[[ "${{ env.SOMEVAR }}" == "Mona the Octocat" ]]'
|
2021-09-27 20:18:59 -05:00
|
|
|
- run: '[ "${SOMEVAR}" = "Not Mona" ] || exit 1'
|
|
|
|
env:
|
|
|
|
SOMEVAR: 'Not Mona'
|
2021-11-12 17:21:18 -06:00
|
|
|
- run: '[[ "${{ steps.dockerlocal.outputs.whoami }}" == "Mona the Octocat" ]]'
|
2021-12-22 13:19:50 -06:00
|
|
|
# Test if overriding args doesn't leak inputs
|
|
|
|
- uses: ./actions/docker-local-noargs
|
|
|
|
with:
|
|
|
|
args: ${{format('"{0}"', 'Mona is not the Octocat') }}
|
|
|
|
who-to-greet: 'Mona the Octocat'
|
|
|
|
- run: '[[ "${{ env.SOMEVAR }}" == "Mona is not the Octocat" ]]'
|
2021-08-09 13:16:31 -05:00
|
|
|
- uses: ./localdockerimagetest_
|