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

Commit 0b4ea45

Browse files
Merge pull request #11 from gha-trigger/ci/setup-ci
ci: set up CI
2 parents 417684c + b38bddf commit 0b4ea45

File tree

6 files changed

+107
-19
lines changed

6 files changed

+107
-19
lines changed

.github/workflows/actionlint.yaml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,15 @@
1+
---
12
name: actionlint
2-
33
on:
4-
pull_request:
5-
branches:
6-
- main
7-
paths:
8-
- .github/**
9-
- aqua/actionlint.yaml
104
push:
11-
branches:
12-
- main
13-
paths:
14-
- .github/**
15-
- aqua/actionlint.yaml
16-
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
178
jobs:
18-
test:
9+
default:
1910
runs-on: ubuntu-latest
2011
steps:
21-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v3
2213
- uses: aquaproj/[email protected]
2314
with:
2415
aqua_version: v1.19.2

.github/workflows/renovate-config-validator.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ jobs:
1818
validate:
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: actions/checkout@v2
21+
- uses: actions/checkout@v3
2222
- uses: suzuki-shunsuke/[email protected]

.github/workflows/test.yaml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: test
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
push:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- run: |
15+
cat << EOS >> "$GITHUB_STEP_SUMMARY"
16+
Check commit statuses
17+
18+
- [Normal](https://github.com/gha-trigger/commit-status-action/commit/ac0a3b503e810cd8b154e85921c68c2e232012af)
19+
- [workflow start](https://github.com/gha-trigger/commit-status-action/commit/b8f82e799e56a9fd26068350cc0e919139454b24)
20+
- [workflow skip](https://github.com/gha-trigger/commit-status-action/commit/873f3e646708b88a17982adde41f5d3becde0e74)
21+
- [workflow end (failure)](https://github.com/gha-trigger/commit-status-action/commit/ec3d99fd7984c4abe29f5dc7da4dac6d95444878)
22+
- [workflow end (success)](https://github.com/gha-trigger/commit-status-action/commit/09f6d6cd3ef4d43b4f372badb89a47ab741ec9ca)
23+
24+
EOS
25+
26+
- name: normal
27+
uses: ./
28+
with:
29+
github_token: ${{github.token}}
30+
env:
31+
# https://github.com/gha-trigger/commit-status-action/commit/ac0a3b503e810cd8b154e85921c68c2e232012af
32+
GHA_REPOSITORY_OWNER: gha-trigger
33+
GHA_REPOSITORY_NAME: commit-status-action
34+
GHA_COMMIT_STATUS_SHA: ac0a3b503e810cd8b154e85921c68c2e232012af
35+
36+
- name: workflow start
37+
# https://github.com/gha-trigger/commit-status-action/commit/b8f82e799e56a9fd26068350cc0e919139454b24
38+
uses: ./
39+
with:
40+
github_token: ${{github.token}}
41+
start_workflow: true
42+
env:
43+
GHA_REPOSITORY_OWNER: gha-trigger
44+
GHA_REPOSITORY_NAME: commit-status-action
45+
GHA_COMMIT_STATUS_SHA: b8f82e799e56a9fd26068350cc0e919139454b24
46+
GHA_WORKFLOW_COMMIT_STATUS: "true"
47+
48+
- name: workflow skip
49+
# https://github.com/gha-trigger/commit-status-action/commit/873f3e646708b88a17982adde41f5d3becde0e74
50+
uses: ./
51+
with:
52+
github_token: ${{github.token}}
53+
env:
54+
GHA_REPOSITORY_OWNER: gha-trigger
55+
GHA_REPOSITORY_NAME: commit-status-action
56+
GHA_COMMIT_STATUS_SHA: 873f3e646708b88a17982adde41f5d3becde0e74
57+
GHA_WORKFLOW_COMMIT_STATUS: "true"
58+
59+
- name: workflow end (failure)
60+
# https://github.com/gha-trigger/commit-status-action/commit/ec3d99fd7984c4abe29f5dc7da4dac6d95444878
61+
uses: ./
62+
with:
63+
github_token: ${{github.token}}
64+
needs: |
65+
{
66+
"build": {
67+
"result": "success"
68+
},
69+
"deploy": {
70+
"result": "failure"
71+
}
72+
}
73+
env:
74+
GHA_REPOSITORY_OWNER: gha-trigger
75+
GHA_REPOSITORY_NAME: commit-status-action
76+
GHA_COMMIT_STATUS_SHA: ec3d99fd7984c4abe29f5dc7da4dac6d95444878
77+
GHA_WORKFLOW_COMMIT_STATUS: "true"
78+
79+
- name: workflow end (success)
80+
# https://github.com/gha-trigger/commit-status-action/commit/09f6d6cd3ef4d43b4f372badb89a47ab741ec9ca
81+
uses: ./
82+
with:
83+
github_token: ${{github.token}}
84+
needs: |
85+
{
86+
"build": {
87+
"result": "success"
88+
},
89+
"deploy": {
90+
"result": "success"
91+
}
92+
}
93+
env:
94+
GHA_REPOSITORY_OWNER: gha-trigger
95+
GHA_REPOSITORY_NAME: commit-status-action
96+
GHA_COMMIT_STATUS_SHA: ec3d99fd7984c4abe29f5dc7da4dac6d95444878
97+
GHA_WORKFLOW_COMMIT_STATUS: "true"

.prettierignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
dist/index.js
2-
README.md
2+
*.md

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/run.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export const run = async (inputs: Inputs, envs: Envs): Promise<void> => {
9090
const octokit = github.getOctokit(inputs.githubToken);
9191

9292
if (envs.isWorkflow) {
93-
inputs.context = `${github.context.workflow} / (${github.context.eventName})`;
93+
inputs.context = `${github.context.workflow} (${github.context.eventName})`;
9494
} else {
9595
inputs.context = `${github.context.workflow} / ${github.context.job} (${github.context.eventName})`;
9696
}

0 commit comments

Comments
 (0)