Skip to content

Commit

Permalink
Merge pull request #34 from arkedge/gh-federation-repos
Browse files Browse the repository at this point in the history
Add gh-federation step for checkout internal git dependencies
  • Loading branch information
sksat committed Jun 27, 2023
2 parents 7a2c770 + 549881d commit 545edfc
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@ name: Build

on:
workflow_call:
secrets:
GH_FEDERATION_ENDPOINT:
required: false
inputs:
c2a_repo:
type: string
default: ${{ github.repository }}
federation_repos:
type: string
default: ""
c2a_dir:
type: string
default: '.'
Expand Down Expand Up @@ -49,7 +55,7 @@ on:
default: added

env:
SELF_VERSION: v2.3.0
SELF_VERSION: v2.4.0-beta.0

jobs:
build_linux32:
Expand All @@ -75,6 +81,8 @@ jobs:
CC: ${{ matrix.compiler }}
with:
c2a_repo: ${{ inputs.c2a_repo }}
gh_federation_endpoint: ${{ secrets.GH_FEDERATION_ENDPOINT }}
federation_repos: ${{ inputs.federation_repos }}
c2a_dir: ${{ inputs.c2a_dir }}
c2a_custom_setup: ${{ inputs.c2a_custom_setup }}
cmake_generator: ${{ inputs.cmake_generator_linux32 }}
Expand All @@ -100,6 +108,8 @@ jobs:
- uses: ./action-c2a-build
with:
c2a_repo: ${{ inputs.c2a_repo }}
gh_federation_endpoint: ${{ secrets.GH_FEDERATION_ENDPOINT }}
federation_repos: ${{ inputs.federation_repos }}
c2a_dir: ${{ inputs.c2a_dir }}
c2a_custom_setup: ${{ inputs.c2a_custom_setup }}
build_as_cxx: true
Expand All @@ -119,6 +129,8 @@ jobs:
- uses: ./action-c2a-build-win32
with:
c2a_repo: ${{ inputs.c2a_repo }}
gh_federation_endpoint: ${{ secrets.GH_FEDERATION_ENDPOINT }}
federation_repos: ${{ inputs.federation_repos }}
c2a_dir: ${{ inputs.c2a_dir }}
c2a_custom_setup: ${{ inputs.c2a_custom_setup }}
cmake_generator: ${{ inputs.cmake_generator_win32 }}
Expand All @@ -138,6 +150,8 @@ jobs:
- uses: ./action-c2a-build-win32
with:
c2a_repo: ${{ inputs.c2a_repo }}
gh_federation_endpoint: ${{ secrets.GH_FEDERATION_ENDPOINT }}
federation_repos: ${{ inputs.federation_repos }}
c2a_dir: ${{ inputs.c2a_dir }}
c2a_custom_setup: ${{ inputs.c2a_custom_setup }}
build_as_cxx: true
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/check-coding-rule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: check coding rule
on:
workflow_call:
inputs:
federation_repos:
type: string
default: ""
c2a_dir:
type: string
default: '.'
Expand All @@ -25,6 +28,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: gh-federation
if: inputs.federation_repos != ''
uses: arkedge/[email protected]
with:
endpoint: ${{ secrets.GH_FEDERATION_ENDPOINT }}
repos: ${{ inputs.federation_repos }}

- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
submodules: recursive
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/check-encoding.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: check encoding
on:
workflow_call:
inputs:
federation_repos:
type: string
default: ""
c2a_dir:
type: string
default: '.'
Expand All @@ -14,6 +17,13 @@ jobs:
check_encoding:
runs-on: ubuntu-latest
steps:
- name: gh-federation
if: inputs.federation_repos != ''
uses: arkedge/[email protected]
with:
endpoint: ${{ secrets.GH_FEDERATION_ENDPOINT }}
repos: ${{ inputs.federation_repos }}

- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
submodules: 'recursive'
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,26 @@ name: CI

on:
workflow_call:
inputs:
federation_repos:
type: string
default: ""

jobs:
build:
uses: ./.github/workflows/build.yml
secrets: inherit
with:
federation_repos: ${{ inputs.federation_repos }}

check_coding_rule:
secrets: inherit
uses: ./.github/workflows/check-coding-rule.yml
with:
federation_repos: ${{ inputs.federation_repos }}

check_encoding:
secrets: inherit
uses: ./.github/workflows/check-encoding.yml
with:
federation_repos: ${{ inputs.federation_repos }}
13 changes: 13 additions & 0 deletions action-c2a-build-win32/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ inputs:
c2a_repo:
type: string
default: ${{ github.repository }}
gh_federation_endpoint:
type: string
default: ""
federation_repos:
type: string
default: ""
c2a_dir:
type: string
default: '.'
Expand All @@ -26,6 +32,13 @@ inputs:
runs:
using: "composite"
steps:
- name: gh-federation
if: inputs.federation_repos != ''
uses: arkedge/[email protected]
with:
endpoint: ${{ inputs.gh_federation_endpoint }}
repos: ${{ inputs.federation_repos }}

- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
repository: ${{ inputs.c2a_repo }}
Expand Down
13 changes: 13 additions & 0 deletions action-c2a-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ inputs:
c2a_repo:
type: string
default: ${{ github.repository }}
gh_federation_endpoint:
type: string
default: ""
federation_repos:
type: string
default: ""
c2a_dir:
type: string
default: '.'
Expand Down Expand Up @@ -39,6 +45,13 @@ inputs:
runs:
using: "composite"
steps:
- name: gh-federation
if: inputs.federation_repos != ''
uses: arkedge/[email protected]
with:
endpoint: ${{ inputs.gh_federation_endpoint }}
repos: ${{ inputs.federation_repos }}

- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
repository: ${{ inputs.c2a_repo }}
Expand Down

0 comments on commit 545edfc

Please sign in to comment.