Skip to content

Commit

Permalink
Fixed ci breaking
Browse files Browse the repository at this point in the history
Signed-off-by: jagpreetsinghsasan <[email protected]>
  • Loading branch information
jagpreetsinghsasan committed Sep 6, 2023
1 parent 2496082 commit f5539c3
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 45 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: 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
85 changes: 40 additions & 45 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit f5539c3

Please sign in to comment.