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

Commit

Permalink
ci: set up CI
Browse files Browse the repository at this point in the history
  • Loading branch information
suzuki-shunsuke committed Sep 21, 2022
1 parent 684750c commit 15e53cf
Show file tree
Hide file tree
Showing 7 changed files with 179 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/actionlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: actionlint
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
default:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: aquaproj/aqua-installer@v1.1.2
with:
aqua_version: v1.19.2
- run: actionlint
14 changes: 14 additions & 0 deletions .github/workflows/prettier.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: prettier
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm i -g prettier
- run: prettier -c .
22 changes: 22 additions & 0 deletions .github/workflows/renovate-config-validator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: renovate-config-validator

on:
pull_request:
branches:
- main
paths:
- .github/workflows/renovate-config-validator.yaml
- renovate.json
push:
branches:
- main
paths:
- .github/workflows/renovate-config-validator.yaml
- renovate.json

jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: suzuki-shunsuke/github-action-renovate-config-validator@v0.1.2
105 changes: 105 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: test

on:
pull_request:
branches: [main]
push:
branches: [main]

jobs:
test-pull-request:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./
with:
data: |
{
"event_name": "pull_request",
"event": {
"sha": "a705bd6d8bc3882c983477cb3f20ab74ef8c24c2",
"sender": {
"login": "suzuki-shunsuke"
},
"repository": {
"full_name": "gha-trigger/gha-trigger"
"name": "gha-trigger"
"owner": {
"login": "gha-trigger"
}
},
"pull_request": {
"number": 149,
"merge_commit_sha": "4528ea7ab7a8eef7e596097934a78eab90fb8b33",
"base": {
"ref": "main"
},
"head": {
"sha": "b6d8f3331c6845997b9408163a127e01fd32c120",
"ref": "renovate/github.com-aws-aws-sdk-go-1.x"
},
"html_url": "https://github.com/gha-trigger/step-summary-action/pull/9"
}
}
}
- name: Test GHA_ACTOR
run: |
[ "$GHA_ACTOR" = suzuki-shunsuke ]
- name: Test GHA_EVENT_NAME
run: |
[ "$GHA_EVENT_NAME" = pull_request ]
- 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 ]
test-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./
with:
data: |
{
"event_name": "push",
"event": {
"sha": "a705bd6d8bc3882c983477cb3f20ab74ef8c24c2",
"sender": {
"login": "suzuki-shunsuke"
},
"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": "push",
"event": {
"sha": "a705bd6d8bc3882c983477cb3f20ab74ef8c24c2",
"sender": {
"login": "suzuki-shunsuke"
},
"repository": {
"full_name": "gha-trigger/gha-trigger"
"name": "gha-trigger"
"owner": {
"login": "gha-trigger"
}
}
}
}
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.md
8 changes: 8 additions & 0 deletions aqua.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
# aqua - Declarative CLI Version Manager
# https://aquaproj.github.io/
registries:
- type: standard
ref: v3.58.0 # renovate: depName=aquaproj/aqua-registry
packages:
- name: rhysd/actionlint@v1.6.18
13 changes: 13 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": [
"config:base",
"github>suzuki-shunsuke/renovate-config",
"github>aquaproj/aqua-renovate-config#1.2.5"
],
"packageRules": [
{
"matchUpdateTypes": ["digest"],
"enabled": false
}
]
}

0 comments on commit 15e53cf

Please sign in to comment.