Skip to content

Commit fc2a921

Browse files
authored
Feature/update-action-script-version (#6)
* feat: download the next version * chore: import package-lock
1 parent 1704ca7 commit fc2a921

2 files changed

Lines changed: 22 additions & 11 deletions

File tree

action.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,24 @@ outputs:
1818

1919
runs:
2020
using: "composite"
21+
env:
22+
SCRIPT_VERSION: "0.3.0"
2123
steps:
2224
- name: Cancel Previous Runs
2325
if: ${{ github.ref != 'refs/heads/develop' && github.ref != 'refs/heads/main' }}
2426
uses: styfle/cancel-workflow-action@0.12.1
2527
with:
2628
access_token: ${{ github.token }}
2729
- name: Download Scripts
28-
uses: actions/download-artifact@v4
29-
with:
30-
name: scripts
31-
path: .github/actions/initialize-action
32-
repository: robaone/source
33-
github-token: ${{ github.token }}
34-
run-id: 10897300425
30+
shell: bash
31+
run: |
32+
wget https://github.com/robaone/initialize-action/archive/refs/tags/v${SCRIPT_VERSION}.zip -O scripts.zip
3533
- name: Unzip scripts
3634
shell: bash
3735
run: |
38-
unzip scripts.zip
39-
working-directory: .github/actions/initialize-action
36+
unzip scripts.zip '*/scripts/*.sh'
37+
rm scripts.zip
38+
working-directory: .github/actions
4039
- id: files
4140
uses: tj-actions/changed-files@v45.0.0
4241
- name: List files modified
@@ -46,7 +45,7 @@ runs:
4645
echo ${{ steps.files.outputs.all_changed_files }} | sed -E 's/ /\n/g' > modified_files.txt
4746
echo "## Modified Files"
4847
cat modified_files.txt
49-
cat modified_files.txt | .github/actions/initialize-action/scripts/parse_file_list_for_projects.sh > project_list.txt
48+
cat modified_files.txt | .github/actions/initialize-action-${SCRIPT_VERSION}/scripts/parse_file_list_for_projects.sh > project_list.txt
5049
env:
5150
PROJECT_ROOT: ${{ inputs.project-root }}
5251
- name: Set Dynamic Matrix
@@ -55,7 +54,7 @@ runs:
5554
run: |
5655
echo "## Project List"
5756
cat project_list.txt
58-
matrixStringifiedObject="$(cat project_list.txt | .github/actions/initialize-action/scripts/generate_matrix.sh)"
57+
matrixStringifiedObject="$(cat project_list.txt | .github/actions/initialize-action-${SCRIPT_VERSION}/scripts/generate_matrix.sh)"
5958
echo "## Matrix Object"
6059
echo "$matrixStringifiedObject"
6160
echo "matrix=$matrixStringifiedObject" >> $GITHUB_OUTPUT

package-lock.json

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)