From b25ee1ec4d097565503e1047e96caafcfde161f1 Mon Sep 17 00:00:00 2001 From: senz Date: Mon, 26 Feb 2024 22:05:09 +0000 Subject: [PATCH 01/10] fix: not action --- .github/workflows/config-test.yml | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/.github/workflows/config-test.yml b/.github/workflows/config-test.yml index c4d54bf..de07dc1 100644 --- a/.github/workflows/config-test.yml +++ b/.github/workflows/config-test.yml @@ -5,15 +5,8 @@ on: permissions: read-all jobs: build: - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Run build-user-config workflow - uses: ./.github/workflows/build-user-config.yml - with: - build_matrix_path: .github/test-data/build.yaml - config_path: .github/test-data/config - archive_name: example-cheatsheet + uses: ./.github/workflows/build-user-config.yml + with: + build_matrix_path: .github/test-data/build.yaml + config_path: .github/test-data/config + archive_name: example-cheatsheet From a6de15ac157d29c6bd474cbb08f2a4c25fc7f942 Mon Sep 17 00:00:00 2001 From: senz Date: Mon, 26 Feb 2024 22:12:31 +0000 Subject: [PATCH 02/10] fix: base dir in build user config --- .github/workflows/build-user-config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-user-config.yml b/.github/workflows/build-user-config.yml index a9439bf..d965681 100644 --- a/.github/workflows/build-user-config.yml +++ b/.github/workflows/build-user-config.yml @@ -80,7 +80,7 @@ jobs: with: node-version: 20.11.1 cache: npm - cache-dependency-path: ${{ env.base }}/package-lock.json + cache-dependency-path: ${{ env.base_dir }}/package-lock.json - name: Checkout Cheatsheet uses: actions/checkout@v4 From c3d510f3a6096ae06ed86eec545600c0fa084d2c Mon Sep 17 00:00:00 2001 From: senz Date: Mon, 26 Feb 2024 22:17:44 +0000 Subject: [PATCH 03/10] fix: node options for build --- .github/workflows/build-user-config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-user-config.yml b/.github/workflows/build-user-config.yml index d965681..fba9b24 100644 --- a/.github/workflows/build-user-config.yml +++ b/.github/workflows/build-user-config.yml @@ -98,6 +98,8 @@ jobs: working-directory: ${{ env.base_dir }} - run: npm run build + env: + NODE_OPTIONS: "--openssl-legacy-provider" working-directory: ${{ env.base_dir }} - name: Archive (${{ env.config_name }}) From d0dbf09e3dc4d1be0f15243fddd3a4fc3f22dfba Mon Sep 17 00:00:00 2001 From: senz Date: Mon, 26 Feb 2024 22:25:28 +0000 Subject: [PATCH 04/10] fix: config symlink path --- .github/workflows/build-user-config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-user-config.yml b/.github/workflows/build-user-config.yml index fba9b24..a9eb924 100644 --- a/.github/workflows/build-user-config.yml +++ b/.github/workflows/build-user-config.yml @@ -92,7 +92,7 @@ jobs: - name: symlink config working-directory: ${{ env.base_dir }} run: | - ln -sv "${{ inputs.config_path }}/${{ env.config_file_name }}" "${{ env.cheatsheet_dir }}/config.yml" + ln -sv "${{ env.GITHUB_WORKSPACE }}/${{ inputs.config_path }}/${{ env.config_file_name }}" "${{ env.cheatsheet_dir }}/config.yml" - run: npm ci working-directory: ${{ env.base_dir }} From 89b116de16cb385628bb0b0bb0f3c98a2ae67ec4 Mon Sep 17 00:00:00 2001 From: senz Date: Mon, 26 Feb 2024 22:27:53 +0000 Subject: [PATCH 05/10] fix --- .github/workflows/build-user-config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-user-config.yml b/.github/workflows/build-user-config.yml index a9eb924..65f96f2 100644 --- a/.github/workflows/build-user-config.yml +++ b/.github/workflows/build-user-config.yml @@ -92,7 +92,7 @@ jobs: - name: symlink config working-directory: ${{ env.base_dir }} run: | - ln -sv "${{ env.GITHUB_WORKSPACE }}/${{ inputs.config_path }}/${{ env.config_file_name }}" "${{ env.cheatsheet_dir }}/config.yml" + ln -sv "${GITHUB_WORKSPACE}/${{ inputs.config_path }}/${{ env.config_file_name }}" "${{ env.cheatsheet_dir }}/config.yml" - run: npm ci working-directory: ${{ env.base_dir }} From f8ad3c5fa28a44761bf5283b9f369096a4a0ca90 Mon Sep 17 00:00:00 2001 From: senz Date: Mon, 26 Feb 2024 22:34:35 +0000 Subject: [PATCH 06/10] chore: debug --- .github/workflows/build-user-config.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-user-config.yml b/.github/workflows/build-user-config.yml index 65f96f2..2acbb09 100644 --- a/.github/workflows/build-user-config.yml +++ b/.github/workflows/build-user-config.yml @@ -92,8 +92,16 @@ jobs: - name: symlink config working-directory: ${{ env.base_dir }} run: | - ln -sv "${GITHUB_WORKSPACE}/${{ inputs.config_path }}/${{ env.config_file_name }}" "${{ env.cheatsheet_dir }}/config.yml" - + ln -sv ${{ env.config_file_name }}" "${{ env.cheatsheet_dir }}/config.yml" + + - name: Debug config + working-directory: ${{ env.base_dir }} + run: | + ls -l "${GITHUB_WORKSPACE}/${{ inputs.config_path }}/${{ env.config_file_name }}" + ls -l "${{ env.cheatsheet_dir }}/config.yml" + ls -l "${GITHUB_WORKSPACE}/${{ inputs.config_path }}/" + ls -l "${{ env.cheatsheet_dir }}" + - run: npm ci working-directory: ${{ env.base_dir }} From 197b41dc2cc853b9f9f58056c1898ca07ed7b495 Mon Sep 17 00:00:00 2001 From: senz Date: Mon, 26 Feb 2024 22:36:12 +0000 Subject: [PATCH 07/10] fix --- .github/workflows/build-user-config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-user-config.yml b/.github/workflows/build-user-config.yml index 2acbb09..e1539d6 100644 --- a/.github/workflows/build-user-config.yml +++ b/.github/workflows/build-user-config.yml @@ -92,14 +92,14 @@ jobs: - name: symlink config working-directory: ${{ env.base_dir }} run: | - ln -sv ${{ env.config_file_name }}" "${{ env.cheatsheet_dir }}/config.yml" + ln -sv "${GITHUB_WORKSPACE}/${{ inputs.config_path }}/${{ env.config_file_name }}" "${{ env.cheatsheet_dir }}/config.yml" - name: Debug config working-directory: ${{ env.base_dir }} run: | ls -l "${GITHUB_WORKSPACE}/${{ inputs.config_path }}/${{ env.config_file_name }}" ls -l "${{ env.cheatsheet_dir }}/config.yml" - ls -l "${GITHUB_WORKSPACE}/${{ inputs.config_path }}/" + ls -l"${GITHUB_WORKSPACE}/${{ inputs.config_path }}/" ls -l "${{ env.cheatsheet_dir }}" - run: npm ci From 4ac2df13981867d79d2cb0ef92c63e3967fe934f Mon Sep 17 00:00:00 2001 From: senz Date: Mon, 26 Feb 2024 22:37:20 +0000 Subject: [PATCH 08/10] fff --- .github/workflows/build-user-config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-user-config.yml b/.github/workflows/build-user-config.yml index e1539d6..a3532f3 100644 --- a/.github/workflows/build-user-config.yml +++ b/.github/workflows/build-user-config.yml @@ -99,7 +99,7 @@ jobs: run: | ls -l "${GITHUB_WORKSPACE}/${{ inputs.config_path }}/${{ env.config_file_name }}" ls -l "${{ env.cheatsheet_dir }}/config.yml" - ls -l"${GITHUB_WORKSPACE}/${{ inputs.config_path }}/" + ls -l "${GITHUB_WORKSPACE}/${{ inputs.config_path }}/" ls -l "${{ env.cheatsheet_dir }}" - run: npm ci From 77c49efb08cd9dad35108b1386dd775a606bc823 Mon Sep 17 00:00:00 2001 From: senz Date: Mon, 26 Feb 2024 22:41:03 +0000 Subject: [PATCH 09/10] fix: correct node dir --- .github/workflows/build-user-config.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-user-config.yml b/.github/workflows/build-user-config.yml index a3532f3..9f1b117 100644 --- a/.github/workflows/build-user-config.yml +++ b/.github/workflows/build-user-config.yml @@ -76,19 +76,19 @@ jobs: # cp -R ${{ inputs.config_path }}/* "${{ env.base_dir }}/${{ inputs.config_path }}/" # fi - - uses: actions/setup-node@v4 - with: - node-version: 20.11.1 - cache: npm - cache-dependency-path: ${{ env.base_dir }}/package-lock.json - - name: Checkout Cheatsheet uses: actions/checkout@v4 with: repository: senz/cheatsheet-generator path: ${{ env.cheatsheet_dir }} - # ref: ${{ env.ch_version }} - + # ref: ${{ env.ch_version }} + + - uses: actions/setup-node@v4 + with: + node-version: 20.11.1 + cache: npm + cache-dependency-path: ${{ env.cheatsheet_dir }}/package-lock.json + - name: symlink config working-directory: ${{ env.base_dir }} run: | @@ -103,12 +103,12 @@ jobs: ls -l "${{ env.cheatsheet_dir }}" - run: npm ci - working-directory: ${{ env.base_dir }} + working-directory: ${{ env.cheatsheet_dir }} - run: npm run build env: NODE_OPTIONS: "--openssl-legacy-provider" - working-directory: ${{ env.base_dir }} + working-directory: ${{ env.cheatsheet_dir }} - name: Archive (${{ env.config_name }}) uses: actions/upload-artifact@v4 From b35319fa101311331b8f8db2c0bf75006f3d88cb Mon Sep 17 00:00:00 2001 From: senz Date: Mon, 26 Feb 2024 22:53:08 +0000 Subject: [PATCH 10/10] chore: cosmetics --- .github/test-data/build.yaml | 2 +- .github/workflows/build-user-config.yml | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/test-data/build.yaml b/.github/test-data/build.yaml index ae35638..ef7c268 100644 --- a/.github/test-data/build.yaml +++ b/.github/test-data/build.yaml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/senz/cheatsheet-generator/raw/ea65c9e8b3d436d33fe3b0a69e5c89cf044df464/build-schema.json +# yaml-language-server: $schema=https://github.com/senz/cheatsheet-generator/raw/master/build-schema.json --- include: - config: config.example.yml diff --git a/.github/workflows/build-user-config.yml b/.github/workflows/build-user-config.yml index 9f1b117..f26e88b 100644 --- a/.github/workflows/build-user-config.yml +++ b/.github/workflows/build-user-config.yml @@ -5,7 +5,7 @@ on: inputs: build_matrix_path: description: "Path to the build matrix file" - default: "build.yaml" + default: "cheatsheet-build.yaml" required: false type: string config_path: @@ -15,7 +15,7 @@ on: type: string archive_name: description: "Archive output file name" - default: "cheatsheet" + default: "cheatsheets" required: false type: string @@ -96,6 +96,7 @@ jobs: - name: Debug config working-directory: ${{ env.base_dir }} + if: ${{ runner.debug }} run: | ls -l "${GITHUB_WORKSPACE}/${{ inputs.config_path }}/${{ env.config_file_name }}" ls -l "${{ env.cheatsheet_dir }}/config.yml"