Skip to content

Commit

Permalink
ci: split workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
suzuki-shunsuke committed Nov 12, 2023
1 parent 969836c commit 16be7bc
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 75 deletions.
43 changes: 0 additions & 43 deletions .github/workflows/test-all.yaml

This file was deleted.

47 changes: 15 additions & 32 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,24 @@ jobs:
filters: |
renovate-config-validator:
- renovate.json5
- .github/workflows/wc-renovate-config-validator.yaml
check-files:
- pkgs/**/pkg.yaml
- pkgs/**/registry.yaml
- .github/workflows/wc-check-files.yaml
generate-registry:
- aqua/generate-registry.yaml
- registry.yaml
- pkgs/**/registry.yaml
- .github/workflows/wc-generate-registry.yaml
json-schema:
- registry.yaml
- .github/workflows/wc-json-schema.yaml
test-docker:
- docker/*
- scripts/**
- cmdx.yaml
- .github/workflows/wc-test-docker.yaml
status-check:
# This job is used for main branch's branch protection rule's status check.
Expand Down Expand Up @@ -78,60 +83,38 @@ jobs:

renovate-config-validator:
# Validate Renovate Configuration by renovate-config-validator.
uses: suzuki-shunsuke/renovate-config-validator-workflow/.github/workflows/validate.yaml@4a378742d05b4e67aae34039d7c779ac913cd79d # v0.2.3
uses: ./.github/workflows/wc-renovate-config-validator.yaml
needs: path-filter
if: ${{needs.path-filter.outputs.renovate-config-validator == 'true'}}
permissions:
contents: read

check-files:
runs-on: ubuntu-latest
uses: ./.github/workflows/wc-check-files.yaml
needs: path-filter
if: ${{needs.path-filter.outputs.check-files == 'true'}}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: aquaproj/registry-action/check-files@dff21577b6ec277b2645a7a40db12eeb15b4c581 # v0.2.0
permissions: {}

generate-registry:
runs-on: ubuntu-latest
uses: ./.github/workflows/wc-generate-registry.yaml
needs: path-filter
if: ${{needs.path-filter.outputs.generate-registry == 'true'}}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: aquaproj/aqua-installer@928a2ee4243a9ee8312d80dc8cbaca88fb602a91 # v2.2.0
with:
aqua_version: v2.16.4
policy_allow: "true"
- uses: aquaproj/registry-action/generate-registry@dff21577b6ec277b2645a7a40db12eeb15b4c581 # v0.2.0
permissions: {}

json-schema:
runs-on: ubuntu-latest
uses: ./.github/workflows/wc-json-schema.yaml
needs: path-filter
if: ${{needs.path-filter.outputs.json-schema == 'true'}}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: aquaproj/registry-action/validate-json-schema@dff21577b6ec277b2645a7a40db12eeb15b4c581 # v0.2.0
permissions: {}

prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- run: npm i -g prettier
- run: prettier -c .
uses: ./.github/workflows/wc-prettier.yaml
permissions: {}

test-docker:
runs-on: ubuntu-latest
uses: ./.github/workflows/wc-test-docker.yaml
needs: path-filter
if: ${{needs.path-filter.outputs.test-docker == 'true'}}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: aquaproj/aqua-installer@928a2ee4243a9ee8312d80dc8cbaca88fb602a91 # v2.2.0
with:
aqua_version: v2.16.4
policy_allow: "true"
env:
AQUA_GITHUB_TOKEN: ${{github.token}}
- run: cmdx t suzuki-shunsuke/mkghtag

ci-info:
runs-on: ubuntu-latest
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/wc-check-files.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: check-files
on: workflow_call
jobs:
check-files:
runs-on: ubuntu-latest
permissions: {}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: aquaproj/registry-action/check-files@dff21577b6ec277b2645a7a40db12eeb15b4c581 # v0.2.0
14 changes: 14 additions & 0 deletions .github/workflows/wc-generate-registry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: generate-registry
on: workflow_call
jobs:
generate-registry:
runs-on: ubuntu-latest
permissions: {}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: aquaproj/aqua-installer@928a2ee4243a9ee8312d80dc8cbaca88fb602a91 # v2.2.0
with:
aqua_version: v2.16.4
policy_allow: "true"
- uses: aquaproj/registry-action/generate-registry@dff21577b6ec277b2645a7a40db12eeb15b4c581 # v0.2.0
10 changes: 10 additions & 0 deletions .github/workflows/wc-json-schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: json-schema
on: workflow_call
jobs:
json-schema:
runs-on: ubuntu-latest
permissions: {}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: aquaproj/registry-action/validate-json-schema@dff21577b6ec277b2645a7a40db12eeb15b4c581 # v0.2.0
11 changes: 11 additions & 0 deletions .github/workflows/wc-prettier.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: prettier
on: workflow_call
jobs:
prettier:
runs-on: ubuntu-latest
permissions: {}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- run: npm i -g prettier
- run: prettier -c .
8 changes: 8 additions & 0 deletions .github/workflows/wc-renovate-config-validator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
name: renovate-config-validator
on: workflow_call
jobs:
renovate-config-validator:
uses: suzuki-shunsuke/renovate-config-validator-workflow/.github/workflows/validate.yaml@4a378742d05b4e67aae34039d7c779ac913cd79d # v0.2.3
permissions:
contents: read
16 changes: 16 additions & 0 deletions .github/workflows/wc-test-docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: test-docker
on: workflow_call
jobs:
test-docker:
runs-on: ubuntu-latest
permissions: {}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: aquaproj/aqua-installer@928a2ee4243a9ee8312d80dc8cbaca88fb602a91 # v2.2.0
with:
aqua_version: v2.16.4
policy_allow: "true"
env:
AQUA_GITHUB_TOKEN: ${{github.token}}
- run: cmdx t suzuki-shunsuke/mkghtag

0 comments on commit 16be7bc

Please sign in to comment.