forked from hyperledger-cacti/cacti
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: jagpreetsinghsasan <[email protected]>
- Loading branch information
1 parent
2496082
commit f5539c3
Showing
2 changed files
with
56 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Lint GitHub Actions workflows | ||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
actionlint: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: Download actionlint | ||
id: get_actionlint | ||
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/v1.6.25/scripts/download-actionlint.bash) | ||
shell: bash | ||
- name: Check workflow files | ||
run: ${{ steps.get_actionlint.outputs.executable }} -color | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,51 +13,6 @@ jobs: | |
lint-git-repo-request: '{"cloneUrl": "${{ github.server_url }}/${{ github.repository }}.git", "fetchArgs": ["--update-head-ok", "--no-tags", "--prune", "--progress", "--no-recurse-submodules", "--depth=1", "origin" ,"+${{ github.sha }}:${{ github.ref }}"], "checkoutArgs": [ "${{ github.ref }}"], "targetPhrasePatterns": [], "configDefaultsUrl": "https://inclusivenaming.org/json/dci-lint-config-recommended-v1.json" }' | ||
- name: Get the output response | ||
run: echo "${{ steps.lint-git-repo.outputs.lint-git-repo-response }}" | ||
optimize-ci: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install Indy SDK | ||
run: > | ||
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88 \ | ||
&& sudo add-apt-repository "deb https://repo.sovrin.org/sdk/deb bionic stable" \ | ||
&& sudo apt-get update \ | ||
&& sudo apt-get install -y \ | ||
libindy \ | ||
libnullpay \ | ||
libvcx \ | ||
indy-cli \ | ||
&& sudo rm -f /etc/apt/sources.list.d/sovrin.list* | ||
- name: Set up NodeJS v16.9.1 | ||
uses: actions/[email protected] | ||
with: | ||
node-version: v16.9.1 | ||
|
||
- run: yarn configure | ||
|
||
- name: Get changed files | ||
id: changed-files | ||
uses: tj-actions/changed-files@v35 | ||
with: | ||
separator: "," | ||
|
||
- name: List all changed files | ||
run: echo "${{ steps.changed-files.outputs.all_changed_files }}" | ||
|
||
|
||
- name: Run optimized cli script | ||
id: optimize-ci | ||
run: | | ||
OPTIMIZED_CI_OUTPUT=$(node tools/optimize-ci.js ${{ steps.changed-files.outputs.all_changed_files }}) | ||
echo "OPTIMIZED_CI_OUTPUT=$OPTIMIZED_CI_OUTPUT" >> $GITHUB_OUTPUT | ||
- name: List the changed-files | ||
run: echo "The output is ${{ steps.optimize-ci.outputs.OPTIMIZED_CI_OUTPUT }}" | ||
outputs: | ||
OPTIMIZED_CI_OUTPUT: ${{ steps.optimize-ci.outputs.OPTIMIZED_CI_OUTPUT }} | ||
build-dev: | ||
continue-on-error: false | ||
env: | ||
|
@@ -89,7 +44,47 @@ jobs: | |
- if : ${{ (steps.yarn-cache.outputs.cache-hit != 'true') }} | ||
name: tools_ci_sh | ||
run: ./tools/ci.sh | ||
optimize-ci: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
- name: Use Node.js v16.14.2 | ||
uses: actions/[email protected] | ||
with: | ||
node-version: v16.14.2 | ||
- uses: actions/[email protected] | ||
|
||
- id: yarn-cache | ||
name: Restore Yarn Cache | ||
uses: actions/[email protected] | ||
with: | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} | ||
path: ./.yarn/ | ||
restore-keys: | | ||
${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} | ||
- name: Get changed files | ||
id: changed-files | ||
uses: tj-actions/changed-files@v35 | ||
with: | ||
separator: "," | ||
|
||
- name: List all changed files | ||
run: echo "${{ steps.changed-files.outputs.all_changed_files }}" | ||
|
||
|
||
- name: Run optimized cli script | ||
id: optimize-ci | ||
run: | | ||
OPTIMIZED_CI_OUTPUT=$(node tools/optimize-ci.js ${{ steps.changed-files.outputs.all_changed_files }}) | ||
echo "OPTIMIZED_CI_OUTPUT=$OPTIMIZED_CI_OUTPUT" >> $GITHUB_OUTPUT | ||
- name: List the changed-files | ||
run: echo "The output is ${{ steps.optimize-ci.outputs.OPTIMIZED_CI_OUTPUT }}" | ||
outputs: | ||
OPTIMIZED_CI_OUTPUT: ${{ steps.optimize-ci.outputs.OPTIMIZED_CI_OUTPUT }} | ||
yarn_lint: | ||
continue-on-error: false | ||
env: | ||
|