diff --git a/.github/workflows/auto-pr.yml b/.github/workflows/auto-pr.yml index 6fbaa8d..18317d4 100644 --- a/.github/workflows/auto-pr.yml +++ b/.github/workflows/auto-pr.yml @@ -28,12 +28,19 @@ jobs: pull-request: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: pull-request - uses: repo-sync/pull-request@v2 - with: - destination_branch: ${{ inputs.destination_branch }} - pr_title: ${{ inputs.pr_title }} - pr_body: ${{ inputs.pr_body }} - pr_label: ${{ inputs.pr_label }} - github_token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + # Check if PR already exists + EXISTING=$(gh pr list --base "${{ inputs.destination_branch }}" --head "${{ github.ref_name }}" --json number --jq '.[0].number // empty') + if [ -n "$EXISTING" ]; then + echo "PR #${EXISTING} already exists, skipping." + exit 0 + fi + gh pr create \ + --base "${{ inputs.destination_branch }}" \ + --title "${{ inputs.pr_title }}" \ + --body "${{ inputs.pr_body }}" \ + --label "${{ inputs.pr_label }}" \ No newline at end of file diff --git a/.github/workflows/backlog.yml b/.github/workflows/backlog.yml index 60d2356..735dac7 100644 --- a/.github/workflows/backlog.yml +++ b/.github/workflows/backlog.yml @@ -17,8 +17,8 @@ jobs: runs-on: ubuntu-latest steps: - name: Send Notification to Backlog - uses: bicstone/backlog-notify@master - env: - PROJECT_KEY: ${{ inputs.project }} - API_HOST: ${{ inputs.host }} - API_KEY: ${{ secrets.BACKLOG_API_KEY }} + uses: bicstone/backlog-notify@v6 + with: + project_key: ${{ inputs.project }} + api_host: ${{ inputs.host }} + api_key: ${{ secrets.BACKLOG_API_KEY }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index a2ba481..79f636e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -15,12 +15,12 @@ jobs: name: Yaml Syntax Check runs-on: ubuntu-latest steps: - - uses: actions/checkout@main + - uses: actions/checkout@v4 - name: Install Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: '16' + node-version: '22' - name: Check Yaml Syntax run: | @@ -39,13 +39,13 @@ jobs: name: Generate readme.txt runs-on: ubuntu-latest steps: - - uses: actions/checkout@main + - uses: actions/checkout@v4 - uses: ./actions/wp-readme - name: Check file existence. id: check_files - uses: andstor/file-existence-action@v1 + uses: andstor/file-existence-action@v3 with: files: "readme.txt" @@ -58,7 +58,7 @@ jobs: name: Version really changed? runs-on: ubuntu-latest steps: - - uses: actions/checkout@main + - uses: actions/checkout@v4 - uses: ./actions/versioning with: diff --git a/.github/workflows/npm.yml b/.github/workflows/npm.yml index 85fc542..debbc9a 100644 --- a/.github/workflows/npm.yml +++ b/.github/workflows/npm.yml @@ -31,7 +31,7 @@ jobs: run: working-directory: ${{ inputs.working_directory }} steps: - - uses: actions/checkout@master + - uses: actions/checkout@v4 - name: Install Node uses: actions/setup-node@v4 diff --git a/.github/workflows/php-short-open-tag.yml b/.github/workflows/php-short-open-tag.yml index 8a970f9..e77aee9 100644 --- a/.github/workflows/php-short-open-tag.yml +++ b/.github/workflows/php-short-open-tag.yml @@ -53,7 +53,7 @@ jobs: run: working-directory: ${{ inputs.working_directory }} steps: - - uses: actions/checkout@main + - uses: actions/checkout@v4 - name: Setup PHP with composer uses: shivammathur/setup-php@v2 diff --git a/.github/workflows/phpcs.yml b/.github/workflows/phpcs.yml index 5cfd0bc..e8329dc 100644 --- a/.github/workflows/phpcs.yml +++ b/.github/workflows/phpcs.yml @@ -26,7 +26,7 @@ jobs: run: working-directory: ${{ inputs.working_directory }} steps: - - uses: actions/checkout@master + - uses: actions/checkout@v4 - name: Setup PHP with composer uses: shivammathur/setup-php@v2 diff --git a/.github/workflows/phplint.yml b/.github/workflows/phplint.yml index 66ab19b..090e82a 100644 --- a/.github/workflows/phplint.yml +++ b/.github/workflows/phplint.yml @@ -56,7 +56,7 @@ jobs: matrix: php: ${{ fromJSON(inputs.php_versions) }} steps: - - uses: actions/checkout@main + - uses: actions/checkout@v4 - name: Setup PHP with composer uses: shivammathur/setup-php@v2 diff --git a/.github/workflows/wp-unit-test.yml b/.github/workflows/wp-unit-test.yml index 488c639..c7033c4 100644 --- a/.github/workflows/wp-unit-test.yml +++ b/.github/workflows/wp-unit-test.yml @@ -49,7 +49,7 @@ jobs: env: MYSQL_ROOT_PASSWORD: root steps: - - uses: actions/checkout@master + - uses: actions/checkout@v4 # ubuntu-latest requires subversion. # see: https://github.com/10up/action-wordpress-plugin-deploy/releases/tag/2.3.0 diff --git a/actions/distignore/action.yml b/actions/distignore/action.yml index 1180e85..ae0dfcc 100644 --- a/actions/distignore/action.yml +++ b/actions/distignore/action.yml @@ -6,7 +6,7 @@ runs: steps: - name: Add Prefix id: check_files - uses: andstor/file-existence-action@v1 + uses: andstor/file-existence-action@v3 with: files: ".distignore" diff --git a/actions/versioning/action.yml b/actions/versioning/action.yml index 4d4064e..c6488c5 100644 --- a/actions/versioning/action.yml +++ b/actions/versioning/action.yml @@ -17,7 +17,7 @@ runs: steps: - name: Check file existence. id: check_files - uses: andstor/file-existence-action@v1 + uses: andstor/file-existence-action@v3 with: files: ${{ inputs.files }}