2020-02-10 23:27:05 +00:00
|
|
|
name: basic
|
|
|
|
on: push
|
|
|
|
|
2020-03-06 21:39:01 +00:00
|
|
|
env:
|
|
|
|
TEST: value
|
|
|
|
|
2020-02-10 23:27:05 +00:00
|
|
|
jobs:
|
2020-02-20 03:16:40 +00:00
|
|
|
check:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-08-10 19:40:20 +00:00
|
|
|
- run: '[[ "$(pwd)" == "${GITHUB_WORKSPACE}" ]]'
|
2020-03-06 21:39:01 +00:00
|
|
|
- run: echo ${{ env.TEST }} | grep value
|
|
|
|
- run: env
|
2021-12-22 19:34:18 +00:00
|
|
|
- uses: docker://node:16-buster-slim
|
2020-03-06 21:39:01 +00:00
|
|
|
with:
|
|
|
|
somekey: ${{ env.TEST }}
|
|
|
|
args: echo ${INPUT_SOMEKEY} | grep somevalue
|
2020-02-25 01:48:21 +00:00
|
|
|
- run: ls
|
2021-06-10 23:12:05 +00:00
|
|
|
- run: echo 'hello world'
|
2021-03-29 04:32:45 +00:00
|
|
|
- run: echo ${GITHUB_SHA} >> $(dirname "${GITHUB_WORKSPACE}")/sha.txt
|
|
|
|
- run: cat $(dirname "${GITHUB_WORKSPACE}")/sha.txt | grep ${GITHUB_SHA}
|
2020-02-10 23:27:05 +00:00
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
2020-02-20 03:16:40 +00:00
|
|
|
needs: [check]
|
2020-02-10 23:27:05 +00:00
|
|
|
steps:
|
2021-08-03 17:39:56 +00:00
|
|
|
- uses: actions/checkout@v2
|
2020-02-10 23:27:05 +00:00
|
|
|
- uses: ./actions/action1
|
|
|
|
with:
|
|
|
|
args: echo 'build'
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: [build]
|
|
|
|
steps:
|
2021-12-22 19:34:18 +00:00
|
|
|
- uses: docker://node:16-buster-slim
|
2020-02-10 23:27:05 +00:00
|
|
|
with:
|
2020-02-23 23:01:25 +00:00
|
|
|
args: env
|
2021-12-22 19:34:18 +00:00
|
|
|
- uses: docker://node:16-buster-slim
|
2020-02-23 23:01:25 +00:00
|
|
|
with:
|
|
|
|
entrypoint: /bin/echo
|
|
|
|
args: ${{github.event_name}}
|