Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Commit

Permalink
ci: add testdata
Browse files Browse the repository at this point in the history
  • Loading branch information
suzuki-shunsuke committed Sep 23, 2022
1 parent 14fd5cf commit 354d473
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 79 deletions.
79 changes: 0 additions & 79 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,82 +40,3 @@ jobs:
with:
data: ${{toJSON(fromJSON(env.DATA).data)}}
- run: go run ./cmd/tester "$FILE"

# test-push:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: ./
# with:
# data: |
# {
# "event_name": "push",
# "event": {
# "ref": "refs/heads/renovate/github.com-aws-aws-sdk-go-1.x",
# "sender": {
# "login": "suzuki-shunsuke"
# },
# "head_commit": {
# "id": "a705bd6d8bc3882c983477cb3f20ab74ef8c24c2"
# },
# "repository": {
# "full_name": "gha-trigger/gha-trigger",
# "name": "gha-trigger",
# "owner": {
# "login": "gha-trigger"
# }
# }
# }
# }
# test-release:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: ./
# with:
# data: |
# {
# "event_name": "release",
# "event": {
# "sender": {
# "login": "suzuki-shunsuke"
# },
# "release": {
# "tag_name": "v0.1.0"
# },
# "repository": {
# "full_name": "gha-trigger/gha-trigger",
# "name": "gha-trigger",
# "owner": {
# "login": "gha-trigger"
# }
# }
# }
# }
# - name: Test GHA_ACTOR
# run: |
# [ "$GHA_ACTOR" = suzuki-shunsuke ]
# - name: Test GHA_EVENT_NAME
# run: |
# [ "$GHA_EVENT_NAME" = release ]
# - name: Test GHA_REPOSITORY
# run: |
# [ "$GHA_REPOSITORY" = gha-trigger/gha-trigger ]
# - name: Test GHA_REPOSITORY_OWNER
# run: |
# [ "$GHA_REPOSITORY_OWNER" = gha-trigger ]
# - name: Test GHA_REPOSITORY_NAME
# run: |
# [ "$GHA_REPOSITORY_NAME" = gha-trigger ]
# - name: Test GHA_SHA
# run: |
# [ "$GHA_SHA" = "" ]
# - name: Test GHA_REF
# run: |
# [ "$GHA_REF" = v0.1.0 ]
# - name: Test GHA_REF_NAME
# run: |
# [ "$GHA_REF_NAME" = v0.1.0 ]
# - name: Test GHA_ENV
# run: |
# [ -n "$GHA_ENV" ]
23 changes: 23 additions & 0 deletions testdata/release/normal.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
envs:
GHA_ACTOR: suzuki-shunsuke
GHA_EVENT_NAME: release
GHA_REPOSITORY: gha-trigger/gha-trigger
GHA_REPOSITORY_OWNER: gha-trigger
GHA_REPOSITORY_NAME: gha-trigger
GHA_SHA:
GHA_COMMIT_STATUS_SHA:
GHA_REF: v0.1.0
GHA_REF_NAME: v0.1.0

data:
event_name: release
event:
sender:
login: suzuki-shunsuke
release:
tag_name: v0.1.0
repository:
full_name: gha-trigger/gha-trigger
name: gha-trigger
owner:
login: gha-trigger

0 comments on commit 354d473

Please sign in to comment.