From eb8aa45d551dc2613cb081f4c762154eec024957 Mon Sep 17 00:00:00 2001 From: Javier Viola <363911+pepoviola@users.noreply.github.com> Date: Thu, 22 May 2025 11:39:24 +0200 Subject: [PATCH 1/2] Revert "remove compromised action (#7934)" This reverts commit d3f68513aaf633707d39ad04fbcd10e3a4737704. --- .github/workflows/reusable-preflight.yml | 32 ++++++------ .../zombienet-reusable-preflight.yml | 50 +++++++++---------- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/.github/workflows/reusable-preflight.yml b/.github/workflows/reusable-preflight.yml index fd28f07f38702..8487ab107d7c2 100644 --- a/.github/workflows/reusable-preflight.yml +++ b/.github/workflows/reusable-preflight.yml @@ -78,8 +78,8 @@ jobs: preflight: runs-on: ubuntu-latest outputs: - changes_rust: true - changes_currentWorkflow: true + changes_rust: ${{ steps.set_changes.outputs.rust_any_changed || steps.set_changes.outputs.currentWorkflow_any_changed }} + changes_currentWorkflow: ${{ steps.set_changes.outputs.currentWorkflow_any_changed }} IMAGE: ${{ steps.set_image.outputs.IMAGE }} @@ -112,20 +112,19 @@ jobs: echo "currentWorkflowFile=$(echo ${{ github.workflow_ref }} | sed -nE "s/.*(\.github\/workflows\/[a-zA-Z0-9_-]*\.y[a]?ml)@refs.*/\1/p")" >> $GITHUB_OUTPUT echo "currentActionDir=$(echo ${{ github.action_path }} | sed -nE "s/.*(\.github\/actions\/[a-zA-Z0-9_-]*)/\1/p")" >> $GITHUB_OUTPUT - # removed due to https://news.ycombinator.com/item?id=43368870 - #- name: Set changes - # id: set_changes - # uses: tj-actions/changed-files@v45 - # with: - # files_yaml: | - # rust: - # - '**/*' - # - '!.github/**/*' - # - '!prdoc/**/*' - # - '!docs/**/*' - # currentWorkflow: - # - '${{ steps.current_file.outputs.currentWorkflowFile }}' - # - '.github/workflows/reusable-preflight.yml' + - name: Set changes + id: set_changes + uses: tj-actions/changed-files@v45 + with: + files_yaml: | + rust: + - '**/*' + - '!.github/**/*' + - '!prdoc/**/*' + - '!docs/**/*' + currentWorkflow: + - '${{ steps.current_file.outputs.currentWorkflowFile }}' + - '.github/workflows/reusable-preflight.yml' # # Set image @@ -181,6 +180,7 @@ jobs: shell: bash run: | echo "workflow file: ${{ steps.current_file.outputs.currentWorkflowFile }}" + echo "Modified: ${{ steps.set_changes.outputs.modified_keys }}" # # diff --git a/.github/workflows/zombienet-reusable-preflight.yml b/.github/workflows/zombienet-reusable-preflight.yml index c98a8201e2700..735801d3708a7 100644 --- a/.github/workflows/zombienet-reusable-preflight.yml +++ b/.github/workflows/zombienet-reusable-preflight.yml @@ -117,11 +117,11 @@ jobs: preflight: runs-on: ubuntu-latest outputs: - changes_substrate: true - changes_cumulus: true - changes_polkadot: true - changes_bridges: true - changes_templates: true + changes_substrate: ${{ steps.set_changes.outputs.substrate_any_changed || steps.set_changes.outputs.currentWorkflow_any_changed }} + changes_cumulus: ${{ steps.set_changes.outputs.cumulus_any_changed || steps.set_changes.outputs.currentWorkflow_any_changed }} + changes_polkadot: ${{ steps.set_changes.outputs.polkadot_any_changed || steps.set_changes.outputs.currentWorkflow_any_changed }} + changes_bridges: ${{ steps.set_changes.outputs.bridges_any_changed || steps.set_changes.outputs.currentWorkflow_any_changed }} + changes_templates: ${{ steps.set_changes.outputs.templates_any_changed || steps.set_changes.outputs.currentWorkflow_any_changed }} CI_IMAGE: ${{ steps.set_vars.outputs.IMAGE }} @@ -157,26 +157,25 @@ jobs: echo "currentWorkflowFile=$(echo ${{ github.workflow_ref }} | sed -nE "s/.*(\.github\/workflows\/[a-zA-Z0-9_-]*\.y[a]?ml)@refs.*/\1/p")" >> $GITHUB_OUTPUT echo "currentActionDir=$(echo ${{ github.action_path }} | sed -nE "s/.*(\.github\/actions\/[a-zA-Z0-9_-]*)/\1/p")" >> $GITHUB_OUTPUT - # removed due to https://news.ycombinator.com/item?id=43368870 - #- name: Set changes - # id: set_changes - # uses: tj-actions/changed-files@v45 - # with: - # files_yaml: | - # substrate: - # - 'substrate/**/*' - # cumulus: - # - 'cumulus/**/*' - # polkadot: - # - 'polkadot/**/*' - # bridges: - # - 'bridges/**/*' - # templates: - # - 'templates/**/*' - # currentWorkflow: - # - '${{ steps.current_file.outputs.currentWorkflowFile }}' - # - '.github/workflows/zombienet-reusable-preflight.yml' - # - '.github/zombienet-env' + - name: Set changes + id: set_changes + uses: tj-actions/changed-files@v45 + with: + files_yaml: | + substrate: + - 'substrate/**/*' + cumulus: + - 'cumulus/**/*' + polkadot: + - 'polkadot/**/*' + bridges: + - 'bridges/**/*' + templates: + - 'templates/**/*' + currentWorkflow: + - '${{ steps.current_file.outputs.currentWorkflowFile }}' + - '.github/workflows/zombienet-reusable-preflight.yml' + - '.github/zombienet-env' # # Set environment vars (including runner/image) @@ -209,6 +208,7 @@ jobs: shell: bash run: | echo "workflow file: ${{ steps.current_file.outputs.currentWorkflowFile }}" + echo "Modified: ${{ steps.set_changes.outputs.modified_keys }}" echo "ZOMBIENET_IMAGE: ${{ steps.set_vars.outputs.ZOMBIENET_IMAGE }}" echo "CI_IMAGE: ${{ steps.set_vars.outputs.IMAGE }}" From 7321b7c74bd6dccd6671ab31ecf93f11fd00dbef Mon Sep 17 00:00:00 2001 From: Javier Viola Date: Thu, 22 May 2025 11:44:06 +0200 Subject: [PATCH 2/2] update action to commit of v46.0.5 --- .github/workflows/reusable-preflight.yml | 4 ++-- .github/workflows/zombienet-reusable-preflight.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reusable-preflight.yml b/.github/workflows/reusable-preflight.yml index 8487ab107d7c2..3114c83db4e33 100644 --- a/.github/workflows/reusable-preflight.yml +++ b/.github/workflows/reusable-preflight.yml @@ -114,7 +114,7 @@ jobs: - name: Set changes id: set_changes - uses: tj-actions/changed-files@v45 + uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c #v46.0.5 with: files_yaml: | rust: @@ -219,4 +219,4 @@ jobs: # echo "github.ref: ${{ github.ref }}" echo "github.ref_name: ${{ github.ref_name }}" - echo "github.sha: ${{ github.sha }}" \ No newline at end of file + echo "github.sha: ${{ github.sha }}" diff --git a/.github/workflows/zombienet-reusable-preflight.yml b/.github/workflows/zombienet-reusable-preflight.yml index 735801d3708a7..0e05b77028868 100644 --- a/.github/workflows/zombienet-reusable-preflight.yml +++ b/.github/workflows/zombienet-reusable-preflight.yml @@ -159,7 +159,7 @@ jobs: - name: Set changes id: set_changes - uses: tj-actions/changed-files@v45 + uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c #v46.0.5 with: files_yaml: | substrate: