From 3d2e9a357ba489e1610a3edd3e7f020834690d4a Mon Sep 17 00:00:00 2001
From: Artem Marusov <52680074+kazaker@users.noreply.github.com>
Date: Tue, 4 Oct 2022 18:35:53 +0200
Subject: [PATCH] Delete .github directory
---
.github/FUNDING.yml | 12 -
.github/ISSUE_TEMPLATE/bug_report.yaml | 92 --
.github/ISSUE_TEMPLATE/feature_request.yaml | 59 --
.github/dependabot.yml | 7 -
.github/workflows/auto-approve.yml | 32 -
.github/workflows/auto-merge.yml | 26 -
.github/workflows/codacy-analysis.yml | 56 --
.github/workflows/greetings.yml | 13 -
.github/workflows/manual-matrix-test.yml | 42 -
.github/workflows/manual-test.yml | 52 --
.github/workflows/submodule-sync.yml | 28 -
.github/workflows/sync-release-version.yml | 36 -
.github/workflows/test.yml | 875 --------------------
.github/workflows/update-readme.yml | 41 -
14 files changed, 1371 deletions(-)
delete mode 100644 .github/FUNDING.yml
delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.yaml
delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.yaml
delete mode 100644 .github/dependabot.yml
delete mode 100644 .github/workflows/auto-approve.yml
delete mode 100644 .github/workflows/auto-merge.yml
delete mode 100644 .github/workflows/codacy-analysis.yml
delete mode 100644 .github/workflows/greetings.yml
delete mode 100644 .github/workflows/manual-matrix-test.yml
delete mode 100644 .github/workflows/manual-test.yml
delete mode 100644 .github/workflows/submodule-sync.yml
delete mode 100644 .github/workflows/sync-release-version.yml
delete mode 100644 .github/workflows/test.yml
delete mode 100644 .github/workflows/update-readme.yml
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
deleted file mode 100644
index e6946bf9896..00000000000
--- a/.github/FUNDING.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-# These are supported funding model platforms
-
-github: jackton1
-patreon: # Replace with a single Patreon username
-open_collective: tj-actions
-ko_fi: # Replace with a single Ko-fi username
-tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
-community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
-liberapay: # Replace with a single Liberapay username
-issuehunt: # Replace with a single IssueHunt username
-otechie: # Replace with a single Otechie username
-custom: []
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml
deleted file mode 100644
index 4fdabc090cc..00000000000
--- a/.github/ISSUE_TEMPLATE/bug_report.yaml
+++ /dev/null
@@ -1,92 +0,0 @@
-name: ๐ Bug
-description: Create a report to help us improve
-title: "[BUG]
"
-labels: [bug, needs triage]
-
-body:
- - type: markdown
- attributes:
- value: |
- Thanks for taking the time to fill out this bug report!
- - type: checkboxes
- attributes:
- label: Is there an existing issue for this?
- description: Please search to see if an issue already exists for the bug you encountered.
- options:
- - label: I have searched the existing issues
- required: true
- - type: checkboxes
- attributes:
- label: Does this issue exist in the latest version?
- description: Please view all releases to confirm that this issue hasn't already been fixed.
- options:
- - label: I'm using the latest release
- required: true
- - type: textarea
- id: what-happened
- attributes:
- label: Describe the bug?
- description: A clear and concise description of what the bug is
- placeholder: Tell us what you see!
- validations:
- required: true
- - type: textarea
- id: reproduce
- attributes:
- label: To Reproduce
- description: Steps to reproduce the behavior?
- placeholder: |
- 1. In this environment...
- 2. With this config...
- 3. Run '...'
- 4. See error...
- validations:
- required: true
- - type: dropdown
- id: os
- attributes:
- label: What OS are you seeing the problem on?
- multiple: true
- options:
- - all
- - ubuntu-latest or ubuntu-20.04
- - ubuntu-18.04
- - macos-latest or macos-10.15
- - macos-11
- - windows-latest or windows-2019
- - windows-2016
- validations:
- required: true
- - type: textarea
- id: expected
- attributes:
- label: Expected behavior?
- description: A clear and concise description of what you expected to happen.
- placeholder: Tell us what you expected!
- validations:
- required: true
- - type: textarea
- id: logs
- attributes:
- label: Relevant log output
- description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
- render: shell
- - type: textarea
- attributes:
- label: Anything else?
- description: |
- Links? or References?
-
- Anything that will give us more context about the issue you are encountering!
-
- Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
- validations:
- required: false
- - type: checkboxes
- id: terms
- attributes:
- label: Code of Conduct
- description: By submitting this issue, you agree to follow our [Code of Conduct](../blob/main/CODE_OF_CONDUCT.md)
- options:
- - label: I agree to follow this project's Code of Conduct
- required: true
diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml
deleted file mode 100644
index 9f930cc75ad..00000000000
--- a/.github/ISSUE_TEMPLATE/feature_request.yaml
+++ /dev/null
@@ -1,59 +0,0 @@
-name: Feature request
-description: Suggest an idea for this project
-title: "[Feature] "
-labels: [enhancement]
-
-body:
- - type: markdown
- attributes:
- value: |
- Thanks for taking the time to fill out this feature request!
- - type: checkboxes
- attributes:
- label: Is this feature missing in the latest version?
- description: Please upgrade to the latest version to verify that this feature is still missing.
- options:
- - label: I'm using the latest release
- required: true
- - type: textarea
- id: what-happened
- attributes:
- label: Is your feature request related to a problem? Please describe.
- description: |
- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
- placeholder: Tell us what you see!
- validations:
- required: true
- - type: textarea
- id: requests
- attributes:
- label: Describe the solution you'd like?
- description: A clear and concise description of what you want to happen.
- validations:
- required: true
- - type: textarea
- id: alternative
- attributes:
- label: Describe alternatives you've considered?
- description: A clear and concise description of any alternative solutions or features you've considered.
- validations:
- required: false
- - type: textarea
- attributes:
- label: Anything else?
- description: |
- Links? or References?
-
- Add any other context or screenshots about the feature request here.
-
- Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
- validations:
- required: false
- - type: checkboxes
- id: terms
- attributes:
- label: Code of Conduct
- description: By submitting this issue, you agree to follow our [Code of Conduct](../blob/main/CODE_OF_CONDUCT.md)
- options:
- - label: I agree to follow this project's Code of Conduct
- required: true
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
deleted file mode 100644
index afb98ae0c77..00000000000
--- a/.github/dependabot.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-version: 2
-updates:
-- package-ecosystem: github-actions
- directory: "/"
- schedule:
- interval: daily
- open-pull-requests-limit: 10
diff --git a/.github/workflows/auto-approve.yml b/.github/workflows/auto-approve.yml
deleted file mode 100644
index d5373151274..00000000000
--- a/.github/workflows/auto-approve.yml
+++ /dev/null
@@ -1,32 +0,0 @@
-name: Auto approve
-
-on:
- pull_request_target
-
-jobs:
- auto-approve:
- runs-on: ubuntu-latest
- steps:
- - uses: hmarr/auto-approve-action@v2
- if: |
- (
- github.event.pull_request.user.login == 'dependabot[bot]' ||
- github.event.pull_request.user.login == 'dependabot' ||
- github.event.pull_request.user.login == 'dependabot-preview[bot]' ||
- github.event.pull_request.user.login == 'dependabot-preview' ||
- github.event.pull_request.user.login == 'renovate[bot]' ||
- github.event.pull_request.user.login == 'renovate' ||
- github.event.pull_request.user.login == 'github-actions[bot]'
- )
- &&
- (
- github.actor == 'dependabot[bot]' ||
- github.actor == 'dependabot' ||
- github.actor == 'dependabot-preview[bot]' ||
- github.actor == 'dependabot-preview' ||
- github.actor == 'renovate[bot]' ||
- github.actor == 'renovate' ||
- github.actor == 'github-actions[bot]'
- )
- with:
- github-token: ${{ secrets.PAT_TOKEN }}
diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml
deleted file mode 100644
index 0af8f490227..00000000000
--- a/.github/workflows/auto-merge.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-name: automerge
-on:
- check_suite:
- types:
- - completed
-
-jobs:
- automerge:
- runs-on: ubuntu-latest
- if: |
- github.actor == 'dependabot[bot]' ||
- github.actor == 'dependabot' ||
- github.actor == 'dependabot-preview[bot]' ||
- github.actor == 'dependabot-preview' ||
- github.actor == 'renovate[bot]' ||
- github.actor == 'renovate'
- steps:
- - name: automerge
- uses: pascalgn/automerge-action@v0.15.3
- env:
- GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
- MERGE_METHOD: "rebase"
- UPDATE_METHOD: "rebase"
- MERGE_RETRIES: "6"
- MERGE_RETRY_SLEEP: "100000"
- MERGE_LABELS: ""
\ No newline at end of file
diff --git a/.github/workflows/codacy-analysis.yml b/.github/workflows/codacy-analysis.yml
deleted file mode 100644
index e3153442ae5..00000000000
--- a/.github/workflows/codacy-analysis.yml
+++ /dev/null
@@ -1,56 +0,0 @@
-# This workflow checks out code, performs a Codacy security scan
-# and integrates the results with the
-# GitHub Advanced Security code scanning feature. For more information on
-# the Codacy security scan action usage and parameters, see
-# https://github.com/codacy/codacy-analysis-cli-action.
-# For more information on Codacy Analysis CLI in general, see
-# https://github.com/codacy/codacy-analysis-cli.
-
-name: Codacy Security Scan
-
-on:
- push:
- branches: [ main ]
- pull_request:
- # The branches below must be a subset of the branches above
- branches: [ main ]
- schedule:
- - cron: '15 16 * * 2'
-
-jobs:
- codacy-security-scan:
- # Cancel other workflows that are running for the same branch
- # https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency
- concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
- cancel-in-progress: true
- name: Codacy Security Scan
- runs-on: ubuntu-latest
- steps:
- # Checkout the repository to the GitHub Actions runner
- - name: Checkout code
- uses: actions/checkout@v3
-
- # Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
- - name: Run Codacy Analysis CLI
- continue-on-error: true
- uses: codacy/codacy-analysis-cli-action@v4.2.0
- with:
- # Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
- # You can also omit the token and run the tools that support default configurations
- project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
- verbose: true
- output: results.sarif
- format: sarif
- # Adjust severity of non-security issues
- gh-code-scanning-compat: true
- # Force 0 exit code to allow SARIF file generation
- # This will hand over control about PR rejection to the GitHub side
- max-allowed-issues: 2147483647
-
- # Upload the SARIF file generated in the previous step
- - name: Upload SARIF results file
- continue-on-error: true
- uses: github/codeql-action/upload-sarif@v2
- with:
- sarif_file: results.sarif
diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml
deleted file mode 100644
index 163329e5a76..00000000000
--- a/.github/workflows/greetings.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-name: Greetings
-
-on: [pull_request_target, issues]
-
-jobs:
- greeting:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/first-interaction@v1.1.0
- with:
- repo-token: ${{ secrets.GITHUB_TOKEN }}
- issue-message: "Thanks for reporting this issue, don't forget to star this project if you haven't already to help us reach a wider audience."
- pr-message: "Thanks for implementing a fix, could you ensure that the test covers your changes if applicable."
diff --git a/.github/workflows/manual-matrix-test.yml b/.github/workflows/manual-matrix-test.yml
deleted file mode 100644
index 3f84454ebab..00000000000
--- a/.github/workflows/manual-matrix-test.yml
+++ /dev/null
@@ -1,42 +0,0 @@
-name: Manual Matrix Test
-
-on:
- workflow_dispatch:
-
-jobs:
- changed-files:
- name: Get changes
- runs-on: ubuntu-latest
- outputs:
- matrix: ${{ steps.set-matrix.outputs.matrix }}
- steps:
- - name: Checkout
- uses: actions/checkout@v3
- with:
- fetch-depth: 0 # needed for tj-actions/changed-files
- - name: Get changed files
- id: changed-files
- uses: ./
- with:
- json: true
- - name: List all changed files
- run: |
- echo '${{ steps.changed-files.outputs.all_changed_files }}'
-
- - id: set-matrix
- run: echo "::set-output name=matrix::{\"container\":${{ steps.changed-files.outputs.all_changed_files }}}"
-
- matrix-job:
- name: Run Matrix Job
- runs-on: ubuntu-latest
- needs: [changed-files]
- strategy:
- matrix: ${{ fromJSON(needs.changed-files.outputs.matrix) }}
- max-parallel: 4
- fail-fast: false
- steps:
- - name: Checkout
- uses: actions/checkout@v3
- - name: Test
- run: |
- echo ${{ matrix.container }}
diff --git a/.github/workflows/manual-test.yml b/.github/workflows/manual-test.yml
deleted file mode 100644
index e325ce500d7..00000000000
--- a/.github/workflows/manual-test.yml
+++ /dev/null
@@ -1,52 +0,0 @@
-name: Manual Test
-
-on:
- workflow_dispatch:
-
-jobs:
- test:
- name: Test changed-files
- runs-on: ${{ matrix.platform }}
- strategy:
- fail-fast: false
- max-parallel: 4
- matrix:
- platform: [ubuntu-latest, ubuntu-22.04, windows-latest, macos-latest, macos-11, ubuntu-18.04, windows-2022]
-
- steps:
- - name: Checkout
- uses: actions/checkout@v3
- with:
- submodules: true
- fetch-depth: 0
-
- - name: Run changed-files with defaults
- id: changed-files
- uses: ./
-
- - name: Show output
- run: |
- echo '${{ toJSON(steps.changed-files.outputs) }}'
-
- - name: Run changed-files with glob filtering
- id: changed-files-glob
- uses: ./
- with:
- files: |
- test/*.txt
-
- - name: Show output
- run: |
- echo '${{ toJSON(steps.changed-files-glob.outputs) }}'
-
- - name: Run changed-files with glob filtering and all_old_new_renamed_files
- id: changed-files-glob-all-old-new-renamed-files
- uses: ./
- with:
- include_all_old_new_renamed_files: true
- files: |
- test/*.txt
-
- - name: Show output
- run: |
- echo '${{ toJSON(steps.changed-files-glob-all-old-new-renamed-files.outputs) }}'
diff --git a/.github/workflows/submodule-sync.yml b/.github/workflows/submodule-sync.yml
deleted file mode 100644
index ea0ffe774cb..00000000000
--- a/.github/workflows/submodule-sync.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-on:
- workflow_dispatch:
-
-jobs:
- sync:
- name: Submodule Sync
- runs-on: ubuntu-latest
-
- steps:
- - name: Checkout
- uses: actions/checkout@v3
- with:
- fetch-depth: 0
- submodules: recursive
-
- - name: Git Sumbodule Update
- run: |
- git pull --recurse-submodules
- git submodule update --remote --recursive
-
- - name: Create Pull Request
- uses: peter-evans/create-pull-request@v4.1.3
- with:
- title: "Updated submodule"
- branch: "chore/update-submodule"
- commit-message: "Updated submodule"
- body: "Updated submodule"
- token: ${{ secrets.PAT_TOKEN }}
diff --git a/.github/workflows/sync-release-version.yml b/.github/workflows/sync-release-version.yml
deleted file mode 100644
index d6ba26f190e..00000000000
--- a/.github/workflows/sync-release-version.yml
+++ /dev/null
@@ -1,36 +0,0 @@
-name: Update release version.
-on:
- release:
- types: [published]
-
-
-jobs:
- update-version:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- with:
- fetch-depth: 0
- - name: Run release-tagger
- uses: tj-actions/release-tagger@v2
- - name: Sync release version.
- uses: tj-actions/sync-release-version@v13
- id: sync-release-version
- with:
- pattern: '${{ github.repository }}@'
- only_major: true
- paths: |
- README.md
- - name: Generate CHANGELOG
- uses: tj-actions/github-changelog-generator@v1.15
- with:
- output: 'HISTORY.md'
- - name: Create Pull Request
- uses: peter-evans/create-pull-request@v4.1.3
- with:
- base: "main"
- title: "Upgraded to ${{ steps.sync-release-version.outputs.new_version }}"
- branch: "upgrade-to-${{ steps.sync-release-version.outputs.new_version }}"
- commit-message: "Upgraded from ${{ steps.sync-release-version.outputs.old_version }} -> ${{ steps.sync-release-version.outputs.new_version }}"
- body: "View [CHANGES](https://github.com/${{ github.repository }}/compare/${{ steps.sync-release-version.outputs.old_version }}...${{ steps.sync-release-version.outputs.new_version }})"
- token: ${{ secrets.PAT_TOKEN }}
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
deleted file mode 100644
index 000eca17790..00000000000
--- a/.github/workflows/test.yml
+++ /dev/null
@@ -1,875 +0,0 @@
-name: CI
-
-on:
- push:
- branches:
- - main
- - "**"
- pull_request:
- types:
- - closed
- - opened
- - synchronize
- - reopened
- branches:
- - main
- pull_request_review:
- types:
- - submitted
-
-jobs:
- shellcheck:
- name: Run shellcheck
- runs-on: ubuntu-latest
-
- steps:
- - name: Checkout to branch
- uses: actions/checkout@v3
- - name: shellcheck
- uses: reviewdog/action-shellcheck@v1.15
-
- test-multiple-repositories:
- name: Test with multiple repositories
- runs-on: ${{ matrix.platform }}
- strategy:
- fail-fast: false
- max-parallel: 4
- matrix:
- platform: [ubuntu-latest, ubuntu-22.04, windows-latest, macos-latest, macos-11, ubuntu-18.04, windows-2022]
- steps:
- - name: Checkout into dir1
- uses: actions/checkout@v3
- with:
- submodules: true
- fetch-depth: 0
- path: dir1
- - name: Run changed-files with defaults on the dir1
- id: changed-files-dir1
- uses: ./dir1
- with:
- path: dir1
- - name: Show output
- run: |
- echo '${{ toJSON(steps.changed-files-dir1.outputs) }}'
- shell:
- bash
- - name: List all modified files
- run: |
- for file in ${{ steps.changed-files-dir1.outputs.modified_files }}; do
- echo "$file"
- done
- shell:
- bash
- - name: Checkout into dir2
- uses: actions/checkout@v3
- with:
- submodules: true
- fetch-depth: 0
- path: dir2
- - name: Run changed-files with defaults on the dir2
- id: changed-files-dir2
- uses: ./dir2
- with:
- path: dir2
- - name: Show output
- run: |
- echo '${{ toJSON(steps.changed-files-dir2.outputs) }}'
- shell:
- bash
- - name: List all modified files
- run: |
- for file in ${{ steps.changed-files-dir2.outputs.modified_files }}; do
- echo "$file"
- done
- shell:
- bash
-
- test-similar-base-and-commit-sha:
- name: Test changed-files similar base and commit sha
- runs-on: ${{ matrix.platform }}
- strategy:
- fail-fast: false
- max-parallel: 4
- matrix:
- platform: [ubuntu-latest, ubuntu-22.04, windows-latest, macos-latest, macos-11, ubuntu-18.04, windows-2022]
-
- steps:
- - name: Checkout to branch
- uses: actions/checkout@v3
- with:
- fetch-depth: 0
-
- - name: Run changed-files with similar base and commit sha
- id: changed-files
- continue-on-error: true
- uses: ./
- with:
- base_sha: d1c0ee4
- sha: d1c0ee4
-
- - name: Exit with 1 if no error is raised
- if: steps.changed-files.outcome != 'failure'
- run: |
- echo "Expected: (failure) got ${{ steps.changed-files.outcome }}"
- exit 1
-
- - name: Show output
- run: |
- echo '${{ toJSON(steps.changed-files.outputs) }}'
- shell:
- bash
-
- test-single-commit-history:
- name: Test changed-files single commit history
- runs-on: ${{ matrix.platform }}
- strategy:
- fail-fast: false
- max-parallel: 4
- matrix:
- platform: [ubuntu-latest, ubuntu-22.04, windows-latest, macos-latest, macos-11, ubuntu-18.04, windows-2022]
-
- steps:
- - name: Checkout to branch
- uses: actions/checkout@v3
- with:
- fetch-depth: 1
-
- - name: Run changed-files with a single commit history
- id: changed-files
- continue-on-error: true
- uses: ./
-
- - name: Exit with 1 if no error is raised
- if: steps.changed-files.outcome != 'failure' && github.event.action == 'closed'
- run: |
- echo "Expected: (failure) got ${{ steps.changed-files.outcome }}"
- exit 1
-
- - name: Show output
- run: |
- echo '${{ toJSON(steps.changed-files.outputs) }}'
- shell:
- bash
-
- test-non-existent-base-sha:
- name: Test changed-files non existent base sha
- runs-on: ${{ matrix.platform }}
- strategy:
- fail-fast: false
- max-parallel: 4
- matrix:
- platform: [ubuntu-latest, ubuntu-22.04, windows-latest, macos-latest, macos-11, ubuntu-18.04, windows-2022]
-
- steps:
- - name: Checkout to branch
- uses: actions/checkout@v3
-
- - name: Run changed-files with non existent base sha
- id: changed-files
- uses: ./
- continue-on-error: true
- with:
- base_sha: "4554456"
-
- - name: Show output
- run: |
- echo "${{ toJSON(steps.changed-files.outputs) }}"
- shell:
- bash
-
- - name: Exit with 1 if no error is raised
- if: steps.changed-files.outcome != 'failure'
- run: |
- echo "Expected: (failure) got ${{ steps.changed-files.outcome }}"
- exit 1
-
- - name: Run changed-files-specific with non existent base sha
- id: changed-files-specific
- uses: ./
- continue-on-error: true
- with:
- files: action.yml
- base_sha: "4554456"
-
- - name: Show output
- run: |
- echo "${{ toJSON(steps.changed-files-specific.outputs) }}"
- shell:
- bash
-
- - name: Exit with 1 if no error is raised
- if: steps.changed-files-specific.outcome != 'failure'
- run: |
- echo "Expected: (failure) got ${{ steps.changed-files-specific.outcome }}"
- exit 1
-
- test-non-existent-sha:
- name: Test changed-files non existent sha
- runs-on: ${{ matrix.platform }}
- strategy:
- fail-fast: false
- max-parallel: 4
- matrix:
- platform: [ubuntu-latest, ubuntu-22.04, windows-latest, macos-latest, macos-11, ubuntu-18.04, windows-2022]
-
- steps:
- - name: Checkout to branch
- uses: actions/checkout@v3
-
- - name: Run changed-files with non existent sha
- id: changed-files
- uses: ./
- continue-on-error: true
- with:
- base_sha: "4554456"
-
- - name: Show output
- run: |
- echo "${{ toJSON(steps.changed-files.outputs) }}"
- shell:
- bash
-
- - name: Exit with 1 if no error is raised
- if: steps.changed-files.outcome != 'failure'
- run: |
- echo "Expected: (failure) got ${{ steps.changed-files.outcome }}"
- exit 1
-
- - name: Run changed-files-specific with non existent sha
- id: changed-files-specific
- uses: ./
- continue-on-error: true
- with:
- files: action.yml
- base_sha: "4554456"
-
- - name: Show output
- run: |
- echo "${{ toJSON(steps.changed-files-specific.outputs) }}"
- shell:
- bash
-
- - name: Exit with 1 if no error is raised
- if: steps.changed-files-specific.outcome != 'failure'
- run: |
- echo "Expected: (failure) got ${{ steps.changed-files-specific.outcome }}"
- exit 1
-
- test:
- name: Test changed-files
- runs-on: ${{ matrix.platform }}
- strategy:
- fail-fast: false
- max-parallel: 4
- matrix:
- platform: [ubuntu-latest, ubuntu-22.04, windows-latest, macos-latest, macos-11, ubuntu-18.04, windows-2022]
-
- steps:
- - name: Checkout
- uses: actions/checkout@v3
- with:
- submodules: true
- fetch-depth: 0
- - name: Dump GitHub context
- env:
- GITHUB_CONTEXT: ${{ toJson(github) }}
- run: echo "$GITHUB_CONTEXT"
- - name: Run changed-files with defaults
- id: changed-files
- uses: ./
- - name: Show output
- run: |
- echo '${{ toJSON(steps.changed-files.outputs) }}'
- shell:
- bash
- - name: List all modified files
- run: |
- for file in ${{ steps.changed-files.outputs.modified_files }}; do
- echo $file
- done
- shell:
- bash
- - name: Run step when README.md changes
- if: contains(steps.changed-files.outputs.modified_files, 'README.md')
- run: |
- echo "Your README.md has been modified ${{ steps.changed-files.outputs.modified_files }}."
- shell:
- bash
- - name: Run changed-files with quotepath disabled for single path
- id: changed-files-quotepath-specific
- uses: ./
- with:
- files: test/test-รจ.txt
- quotepath: "false"
- - name: Show output
- run: |
- echo '${{ toJSON(steps.changed-files-quotepath-specific.outputs) }}'
- shell:
- bash
- - name: Run changed-files with quotepath disabled
- id: changed-files-quotepath
- uses: ./
- with:
- quotepath: "false"
- - name: Show output
- run: |
- echo '${{ toJSON(steps.changed-files-quotepath.outputs) }}'
- shell:
- bash
- - name: Run changed-files with dir_names
- id: changed-files-dir-names
- uses: ./
- with:
- base_sha: d1c0ee4
- sha: 4d04215
- dir_names: "true"
- - name: Show output
- run: |
- echo '${{ toJSON(steps.changed-files-dir-names.outputs) }}'
- shell:
- bash
- - name: Check dir_names output
- if: "!contains(steps.changed-files-dir-names.outputs.all_changed_files, 'test')"
- run: |
- echo "Invalid output: Expected to include (test) got (${{ steps.changed-files-dir-names.outputs.all_changed_files }})"
- exit 1
- shell:
- bash
- - name: Run changed-files since 2022-08-19
- id: changed-files-since
- uses: ./
- continue-on-error: true
- with:
- since: "2022-08-19"
- - name: Show output
- run: |
- echo '${{ toJSON(steps.changed-files-since.outputs) }}'
- shell:
- bash
- - name: Run changed-files until 2022-08-20
- id: changed-files-until
- uses: ./
- continue-on-error: true
- with:
- until: "2022-08-20"
- - name: Show output
- run: |
- echo '${{ toJSON(steps.changed-files-until.outputs) }}'
- shell:
- bash
- - name: Run changed-files with forward slash separator
- id: changed-files-forward-slash
- uses: ./
- with:
- separator: "/"
- - name: Show output
- run: |
- echo '${{ toJSON(steps.changed-files-forward-slash.outputs) }}'
- shell:
- bash
- - name: Run changed-files with newline separator
- id: changed-files-newline
- uses: ./
- with:
- separator: "\n"
- - name: Show output
- run: |
- echo '${{ toJSON(steps.changed-files-newline.outputs) }}'
- shell:
- bash
- - name: Run changed-files with pipe separator
- id: changed-files-pipe
- uses: ./
- with:
- separator: "|"
- - name: Show output
- run: |
- echo '${{ toJSON(steps.changed-files-pipe.outputs) }}'
- shell:
- bash
- - name: Run changed-files with json output
- id: changed-files-json
- uses: ./
- with:
- json: true
- - name: Show output
- run: |
- echo '${{ toJSON(steps.changed-files-json.outputs) }}'
- echo '${{ toJSON(steps.changed-files-json.outputs.all_changed_files) }}'
- shell:
- bash
- - name: Run changed-files with comma separator
- id: changed-files-comma
- uses: ./
- with:
- separator: ","
- - name: List all modified files
- run: |
- IFS=$',' read -a MODIFIED_FILES_ARRAY <<< "${{ steps.changed-files-comma.outputs.modified_files }}"
- for file in "${MODIFIED_FILES_ARRAY[@]}"; do
- echo $file
- done
- unset IFS
- shell:
- bash
- - name: Show output
- run: |
- echo '${{ toJSON(steps.changed-files-comma.outputs) }}'
- shell:
- bash
- - name: Run changed-files with specific files from a source file using a newline separator
- id: changed-files-specific-newline-source-file
- uses: ./
- with:
- files_from_source_file: |
- test/changed-files-list.txt
- separator: "\n"
- - name: Show output
- run: |
- echo '${{ toJSON(steps.changed-files-specific-newline-source-file.outputs) }}'
- shell:
- bash
- - name: Run changed-files for old new filenames test rename 1
- id: changed-files-all-old-new-renamed-files-1
- uses: ./
- with:
- base_sha: d1c0ee4
- sha: 4d04215
- include_all_old_new_renamed_files: true
- - name: Show output
- run: |
- echo '${{ toJSON(steps.changed-files-all-old-new-renamed-files-1.outputs) }}'
- shell:
- bash
- - name: Check all_old_new_renamed_files output
- if: "!contains(steps.changed-files-all-old-new-renamed-files-1.outputs.all_old_new_renamed_files, 'test/test rename 1.txt,test/test rename-1.txt')"
- run: |
- echo "Invalid output: Expected to include (test/test rename 1.txt,test/test rename-1.txt) got (${{ steps.changed-files-all-old-new-renamed-files-1.outputs.all_old_new_renamed_files }})"
- exit 1
- shell:
- bash
- - name: Run changed-files for old new filenames test rename 2
- id: changed-files-all-old-new-renamed-files-2
- uses: ./
- with:
- base_sha: 4d04215
- sha: fe238e6
- include_all_old_new_renamed_files: true
- - name: Show output
- run: |
- echo '${{ toJSON(steps.changed-files-all-old-new-renamed-files-2.outputs) }}'
- shell:
- bash
- - name: Check all_old_new_renamed_files output
- if: "!contains(steps.changed-files-all-old-new-renamed-files-2.outputs.all_old_new_renamed_files, 'test/test rename 2.txt,test/test rename-2.txt')"
- run: |
- echo "Invalid output: Expected to include (test/test rename 2.txt test/test rename-2.txt) got (${{ steps.changed-files-all-old-new-renamed-files-2.outputs.all_old_new_renamed_files }})"
- exit 1
- shell:
- bash
- - name: Run changed-files with specific files
- id: changed-files-specific
- uses: ./
- with:
- files: |
- .github/workflows/test.yml
- action.yml
- **/test.txt
- files_ignore: |
- test/test/test.txt
- - name: Show output
- run: |
- echo '${{ toJSON(steps.changed-files-specific.outputs) }}'
- shell:
- bash
- - name: Check if a excluded file is not included in any_changed
- if: "contains(steps.changed-files-specific.outputs.all_changed_files, 'test/test/test.txt')"
- run: |
- echo "Invalid output: Expected not to include (test/test/test.txt) got (${{ steps.changed-files-specific.outputs.all_changed_files }})"
- exit 1
- shell:
- bash
- - name: Verify any_changed for specific files
- if: "!contains(steps.changed-files-specific.outputs.all_changed_files, 'action.yml') && !contains(steps.changed-files-specific.outputs.all_changed_files, '.github/workflows/test.yml') && !contains(steps.changed-files-specific.outputs.all_changed_files, 'test/test.txt')"
- run: |
- if [[ "${{ steps.changed-files-specific.outputs.any_changed }}" != "false" ]]; then
- echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific.outputs.any_changed }})"
- exit 1
- fi
- shell:
- bash
- - name: Check if a excluded file is not included in any_modified
- if: "contains(steps.changed-files-specific.outputs.all_modified_files, 'test/test/test.txt')"
- run: |
- echo "Invalid output: Expected not to include (test/test/test.txt) got (${{ steps.changed-files-specific.outputs.all_modified_files }})"
- exit 1
- shell:
- bash
- - name: Verify any_modified for specific files
- if: "!contains(steps.changed-files-specific.outputs.all_modified_files, 'action.yml') && !contains(steps.changed-files-specific.outputs.all_modified_files, '.github/workflows/test.yml') && !contains(steps.changed-files-specific.outputs.all_modified_files, 'test/test.txt')"
- run: |
- if [[ "${{ steps.changed-files-specific.outputs.any_modified }}" != "false" ]]; then
- echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific.outputs.any_modified }})"
- exit 1
- fi
- shell:
- bash
- - name: Check if a excluded file is not included in any_deleted
- if: "contains(steps.changed-files-specific.outputs.deleted_files, 'test/test/test.txt')"
- run: |
- echo "Invalid output: Expected not to include (test/test/test.txt) got (${{ steps.changed-files-specific.outputs.deleted_files }})"
- exit 1
- shell:
- bash
- - name: Verify any_deleted for specific files
- if: "!contains(steps.changed-files-specific.outputs.deleted_files, 'action.yml') && !contains(steps.changed-files-specific.outputs.deleted_files, '.github/workflows/test.yml') && !contains(steps.changed-files-specific.outputs.deleted_files, 'test/test.txt')"
- run: |
- if [[ "${{ steps.changed-files-specific.outputs.any_deleted }}" != "false" ]]; then
- echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific.outputs.any_deleted }})"
- exit 1
- fi
- shell:
- bash
- - name: Run changed-files with specific files comma check duplicates
- id: changed-files-specific-duplicate-output
- uses: ./
- with:
- files: |
- get-changed-paths.sh
- *.sh
- - name: Verify all_changed_files files has no duplicates
- if: contains(steps.changed-files-specific-duplicate-output.outputs.all_changed_files, 'get-changed-paths.sh')
- run: |
- ALL_CHANGED_FILES=(${{ steps.changed-files-specific-duplicate-output.outputs.all_changed_files }})
- UNIQUE_ALL_CHANGED_FILES=$(echo "$ALL_CHANGED_FILES" | tr ' ' '\n' | sort -u | xargs)
-
- if [[ "$ALL_CHANGED_FILES[@]" != "$UNIQUE_ALL_CHANGED_FILES[@]" ]]; then
- echo "Duplicate output: Expected "$UNIQUE_ALL_CHANGED_FILES" got $ALL_CHANGED_FILES"
- exit 1
- fi
- shell:
- bash
- - name: Verify all_changed_and_modified_files files has no duplicates
- if: contains(steps.changed-files-specific-duplicate-output.outputs.all_changed_and_modified_files, 'get-changed-paths.sh')
- run: |
- ALL_CHANGED_AND_MODIFIED_FILES=(${{ steps.changed-files-specific-duplicate-output.outputs.all_changed_and_modified_files }})
- UNIQUE_ALL_CHANGED_AND_MODIFIED_FILES=$(echo "$ALL_CHANGED_AND_MODIFIED_FILES" | tr ' ' '\n' | sort -u | xargs)
-
- if [[ "$ALL_CHANGED_AND_MODIFIED_FILES[@]" != "$UNIQUE_ALL_CHANGED_AND_MODIFIED_FILES[@]" ]]; then
- echo "Duplicate output: Expected "$UNIQUE_ALL_CHANGED_AND_MODIFIED_FILES" got $ALL_CHANGED_AND_MODIFIED_FILES"
- exit 1
- fi
- shell:
- bash
- - name: Verify all_modified_files files has no duplicates
- if: contains(steps.changed-files-specific-duplicate-output.outputs.all_modified_files, 'get-changed-paths.sh')
- run: |
- ALL_MODIFIED_FILES=(${{ steps.changed-files-specific-duplicate-output.outputs.all_modified_files }})
- UNIQUE_ALL_MODIFIED_FILES=$(echo "$ALL_MODIFIED_FILES" | tr ' ' '\n' | sort -u | xargs)
-
- if [[ "$ALL_MODIFIED_FILES[@]" != "$UNIQUE_ALL_MODIFIED_FILES[@]" ]]; then
- echo "Duplicate output: Expected "$UNIQUE_ALL_MODIFIED_FILES" got $ALL_MODIFIED_FILES"
- exit 1
- fi
- shell:
- bash
- - name: Run changed-files with specific files comma separator
- id: changed-files-specific-comma
- uses: ./
- with:
- files: |
- .github/workflows/test.yml
- action.yml
- separator: ","
- - name: Show output
- run: |
- echo '${{ toJSON(steps.changed-files-specific-comma.outputs) }}'
- shell:
- bash
- - name: Verify any_changed files comma separator
- if: "!contains(steps.changed-files-specific-comma.outputs.all_changed_files, 'action.yml') && !contains(steps.changed-files-specific-comma.outputs.all_changed_files, '.github/workflows/test.yml')"
- run: |
- if [[ "${{ steps.changed-files-specific-comma.outputs.any_changed }}" != "false" ]]; then
- echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-comma.outputs.any_changed }})"
- exit 1
- fi
- shell:
- bash
- - name: Verify any_modified files comma separator
- if: "!contains(steps.changed-files-specific-comma.outputs.all_modified_files, 'action.yml') && !contains(steps.changed-files-specific-comma.outputs.all_modified_files, '.github/workflows/test.yml')"
- run: |
- if [[ "${{ steps.changed-files-specific-comma.outputs.any_modified }}" != "false" ]]; then
- echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-comma.outputs.any_modified }})"
- exit 1
- fi
- shell:
- bash
- - name: Verify any_deleted files comma separator
- if: "!contains(steps.changed-files-specific-comma.outputs.deleted_files, 'action.yml') && !contains(steps.changed-files-specific-comma.outputs.deleted_files, '.github/workflows/test.yml')"
- run: |
- if [[ "${{ steps.changed-files-specific-comma.outputs.any_deleted }}" != "false" ]]; then
- echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-comma.outputs.any_deleted }})"
- exit 1
- fi
- shell:
- bash
- - name: Run changed-files with specific files pipe separator
- id: changed-files-specific-pipe
- uses: ./
- with:
- files: |
- **/test.yml
- action.yml
- separator: "|"
- - name: Show output
- run: |
- echo '${{ toJSON(steps.changed-files-specific-pipe.outputs) }}'
- shell:
- bash
- - name: Verify any_changed files comma separator
- if: "!contains(steps.changed-files-specific-pipe.outputs.all_changed_files, 'action.yml') && !contains(steps.changed-files-specific-pipe.outputs.all_changed_files, '.github/workflows/test.yml')"
- run: |
- if [[ "${{ steps.changed-files-specific-pipe.outputs.any_changed }}" != "false" ]]; then
- echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-pipe.outputs.any_changed }})"
- exit 1
- fi
- shell:
- bash
- - name: Verify any_modified files comma separator
- if: "!contains(steps.changed-files-specific-pipe.outputs.all_modified_files, 'action.yml') && !contains(steps.changed-files-specific-pipe.outputs.all_modified_files, '.github/workflows/test.yml')"
- run: |
- if [[ "${{ steps.changed-files-specific-pipe.outputs.any_modified }}" != "false" ]]; then
- echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-pipe.outputs.any_modified }})"
- exit 1
- fi
- shell:
- bash
- - name: Verify any_deleted files comma separator
- if: "!contains(steps.changed-files-specific-pipe.outputs.deleted_files, 'action.yml') && !contains(steps.changed-files-specific-pipe.outputs.deleted_files, '.github/workflows/test.yml')"
- run: |
- if [[ "${{ steps.changed-files-specific-pipe.outputs.any_deleted }}" != "false" ]]; then
- echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-pipe.outputs.any_deleted }})"
- exit 1
- fi
- shell:
- bash
- - name: Run changed-files with specific files forward slash separator
- id: changed-files-specific-forward-slash
- uses: ./
- with:
- files: |
- .github/workflows/test.yml
- action.yml
- separator: "/"
- - name: Show output
- run: |
- echo '${{ toJSON(steps.changed-files-specific-forward-slash.outputs) }}'
- shell:
- bash
- - name: Verify any_changed files forward slash separator
- if: "!contains(steps.changed-files-specific-forward-slash.outputs.all_changed_files, 'action.yml') && !contains(steps.changed-files-specific-forward-slash.outputs.all_changed_files, '.github/workflows/test.yml')"
- run: |
- if [[ "${{ steps.changed-files-specific-forward-slash.outputs.any_changed }}" != "false" ]]; then
- echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-forward-slash.outputs.any_changed }})"
- exit 1
- fi
- shell:
- bash
- - name: Verify any_modified files forward slash separator
- if: "!contains(steps.changed-files-specific-forward-slash.outputs.all_modified_files, 'action.yml') && !contains(steps.changed-files-specific-forward-slash.outputs.all_modified_files, '.github/workflows/test.yml')"
- run: |
- if [[ "${{ steps.changed-files-specific-forward-slash.outputs.any_modified }}" != "false" ]]; then
- echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-forward-slash.outputs.any_modified }})"
- exit 1
- fi
- shell:
- bash
- - name: Verify any_deleted files forward slash separator
- if: "!contains(steps.changed-files-specific-forward-slash.outputs.deleted_files, 'action.yml') && !contains(steps.changed-files-specific-forward-slash.outputs.deleted_files, '.github/workflows/test.yml')"
- run: |
- if [[ "${{ steps.changed-files-specific-forward-slash.outputs.any_deleted }}" != "false" ]]; then
- echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-forward-slash.outputs.any_deleted }})"
- exit 1
- fi
- shell:
- bash
- - name: Run changed-files with specific files from a source file
- id: changed-files-specific-source-file
- uses: ./
- with:
- files_from_source_file: |
- test/changed-files-list.txt
- test/changed-files-list.txt
- files: |
- **/workflows/greetings.yml
- - name: Check if a excluded file is not included in any_changed
- if: contains(steps.changed-files-specific-source-file.outputs.all_changed_files, 'test/test/test.txt')
- run: |
- echo "Invalid output: Expected not to include (test/test/test.txt) got (${{ steps.changed-files-specific-source-file.outputs.all_changed_files }})"
- exit 1
- shell:
- bash
- - name: Verify any_changed from source files
- if: |
- (
- !contains(steps.changed-files-specific-source-file.outputs.all_changed_files, 'action.yml') &&
- !contains(steps.changed-files-specific-source-file.outputs.all_changed_files, '.github/workflows/test.yml') &&
- !contains(steps.changed-files-specific-source-file.outputs.all_changed_files, '.github/workflows/greetings.yml') &&
- !contains(steps.changed-files-specific-source-file.outputs.all_changed_files, 'test/test.txt')
- )
- run: |
- if [[ "${{ steps.changed-files-specific-source-file.outputs.any_changed }}" != "false" ]]; then
- echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-source-file.outputs.any_changed }})"
- exit 1
- fi
- shell:
- bash
- - name: Check if a excluded file is not included in any_modified
- if: contains(steps.changed-files-specific-source-file.outputs.all_modified_files, 'test/test/test.txt')
- run: |
- echo "Invalid output: Expected not to include (test/test/test.txt) got (${{ steps.changed-files-specific-source-file.outputs.all_modified_files }})"
- exit 1
- shell:
- bash
- - name: Verify any_modified from source files
- if: |
- (
- !contains(steps.changed-files-specific-source-file.outputs.all_modified_files, 'action.yml') &&
- !contains(steps.changed-files-specific-source-file.outputs.all_modified_files, '.github/workflows/test.yml') &&
- !contains(steps.changed-files-specific-source-file.outputs.all_modified_files, '.github/workflows/greetings.yml') &&
- !contains(steps.changed-files-specific-source-file.outputs.all_modified_files, 'test/test.txt')
- )
- run: |
- if [[ "${{ steps.changed-files-specific-source-file.outputs.any_modified }}" != "false" ]]; then
- echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-source-file.outputs.any_modified }})"
- exit 1
- fi
- shell:
- bash
- - name: Check if a excluded file is not included in any_deleted
- if: contains(steps.changed-files-specific-source-file.outputs.deleted_files, 'test/test/test.txt')
- run: |
- echo "Invalid output: Expected not to include (test/test/test.txt) got (${{ steps.changed-files-specific-source-file.outputs.deleted_files }})"
- exit 1
- shell:
- bash
- - name: Verify any_deleted from source files
- if: "!contains(steps.changed-files-specific-source-file.outputs.deleted_files, 'action.yml') && !contains(steps.changed-files-specific-source-file.outputs.deleted_files, '.github/workflows/test.yml') && !contains(steps.changed-files-specific-source-file.outputs.deleted_files, 'test/test.txt')"
- run: |
- if [[ "${{ steps.changed-files-specific-source-file.outputs.any_deleted }}" != "false" ]]; then
- echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-source-file.outputs.any_deleted }})"
- exit 1
- fi
- shell:
- bash
- - name: Show output
- run: |
- echo '${{ toJSON(steps.changed-files-specific-source-file.outputs) }}'
- shell:
- bash
- - name: Run changed-files with specific files from a source file using a comma separator
- id: changed-files-specific-comma-source-file
- uses: ./
- with:
- files_from_source_file: |
- test/changed-files-list.txt
- separator: ","
- - name: Show output
- run: |
- echo '${{ toJSON(steps.changed-files-specific-comma-source-file.outputs) }}'
- shell:
- bash
- - name: Verify any_changed files comma separator
- if: "!contains(steps.changed-files-specific-comma-source-file.outputs.all_changed_files, 'action.yml') && !contains(steps.changed-files-specific-comma-source-file.outputs.all_changed_files, '.github/workflows/test.yml') && !contains(steps.changed-files-specific-comma.outputs.all_changed_files, 'test/test.txt')"
- run: |
- if [[ "${{ steps.changed-files-specific-comma-source-file.outputs.any_changed }}" != "false" ]]; then
- echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-comma-source-file.outputs.any_changed }})"
- exit 1
- fi
- shell:
- bash
- - name: Verify any_modified files comma separator
- if: "!contains(steps.changed-files-specific-comma-source-file.outputs.all_modified_files, 'action.yml') && !contains(steps.changed-files-specific-comma-source-file.outputs.all_modified_files, '.github/workflows/test.yml') && !contains(steps.changed-files-specific-comma.outputs.all_modified_files, 'test/test.txt')"
- run: |
- if [[ "${{ steps.changed-files-specific-comma-source-file.outputs.any_modified }}" != "false" ]]; then
- echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-comma-source-file.outputs.any_modified }})"
- exit 1
- fi
- shell:
- bash
- - name: Verify any_deleted files with comma separator
- if: "!contains(steps.changed-files-specific-comma-source-file.outputs.deleted_files, 'action.yml') && !contains(steps.changed-files-specific-comma-source-file.outputs.deleted_files, '.github/workflows/test.yml') && !contains(steps.changed-files-specific-comma.outputs.deleted_files, 'test/test.txt')"
- run: |
- if [[ "${{ steps.changed-files-specific-comma-source-file.outputs.any_deleted }}" != "false" ]]; then
- echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-comma-source-file.outputs.any_deleted }})"
- exit 1
- fi
- shell:
- bash
- - name: Run changed-files with custom sha
- id: changed-files-custom-sha
- uses: ./
- with:
- sha: ${{ github.event.pull_request.head.sha }}
- - name: Show output
- run: |
- echo '${{ toJSON(steps.changed-files-custom-sha.outputs) }}'
- shell:
- bash
- - name: Show output
- run: |
- echo '${{ toJSON(steps.changed-files-since-last-remote-commit.outputs) }}'
- shell:
- bash
- - name: Get branch name
- id: branch-name
- uses: tj-actions/branch-names@v6
- if: github.event_name == 'pull_request'
- - uses: nrwl/last-successful-commit-action@v1
- id: last_successful_commit
- if: github.event_name == 'pull_request' && github.event.action != 'closed'
- with:
- branch: ${{ steps.branch-name.outputs.base_ref_branch }}
- workflow_id: 'test.yml'
- github_token: ${{ secrets.GITHUB_TOKEN }}
- - name: Run changed-files with a custom base sha
- if: github.event_name == 'pull_request' && github.event.action != 'closed'
- id: changed-files-custom-base-sha
- uses: ./
- with:
- base_sha: ${{ steps.last_successful_commit.outputs.commit_hash }}
- - name: Show output
- if: github.event_name == 'pull_request' && github.event.action != 'closed'
- run: |
- echo '${{ toJSON(steps.changed-files-custom-base-sha.outputs) }}'
- shell:
- bash
- - name: Run changed-files with specific files (only-changed)
- id: changed-files-specific-only-changed
- uses: ./
- with:
- files: |
- .github/**/test.yml
- - name: Verify only_changed files
- if: steps.changed-files-specific-only-changed.outputs.other_changed_files != ''
- run: |
- if [[ "${{ steps.changed-files-specific-only-changed.outputs.only_changed }}" != "false" ]]; then
- echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-only-changed.outputs.only_changed }})"
- exit 1
- fi
- shell:
- bash
- - name: Verify only_deleted files
- if: steps.changed-files-specific-only-changed.outputs.other_deleted_files != ''
- run: |
- if [[ "${{ steps.changed-files-specific-only-changed.outputs.only_deleted }}" != "false" ]]; then
- echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-only-changed.outputs.only_deleted }})."
- exit 1
- fi
- shell:
- bash
- - name: Show output
- run: |
- echo '${{ toJSON(steps.changed-files-specific-only-changed.outputs) }}'
- shell:
- bash
diff --git a/.github/workflows/update-readme.yml b/.github/workflows/update-readme.yml
deleted file mode 100644
index 5a4ccf79a3d..00000000000
--- a/.github/workflows/update-readme.yml
+++ /dev/null
@@ -1,41 +0,0 @@
-name: Format README.md
-
-on:
- push:
- branches:
- - main
-
-jobs:
- sync-assets:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3.0.2
- with:
- fetch-depth: 0
-
- - name: Run test
- uses: tj-actions/remark@v3
-
- - name: Verify Changed files
- uses: tj-actions/verify-changed-files@v11
- id: verify_changed_files
- with:
- files: |
- README.md
-
- - name: README.md changed
- if: steps.verify_changed_files.outputs.files_changed == 'true'
- run: |
- echo "README.md has uncommited changes"
- exit 1
-
- - name: Create Pull Request
- if: failure()
- uses: peter-evans/create-pull-request@v4.1.3
- with:
- base: "main"
- title: "Updated README.md"
- branch: "chore/update-readme"
- commit-message: "Updated README.md"
- body: "Updated README.md"
- token: ${{ secrets.PAT_TOKEN }}