From 50f9d01c4792577b50da354fea2d66da2577e935 Mon Sep 17 00:00:00 2001 From: Ryan Welcher Date: Thu, 6 Feb 2025 15:34:00 -0500 Subject: [PATCH 1/2] Use the needs keyword to control deploy. --- .github/workflows/deploy-to-staging.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy-to-staging.yml b/.github/workflows/deploy-to-staging.yml index 0613be5..61c124f 100644 --- a/.github/workflows/deploy-to-staging.yml +++ b/.github/workflows/deploy-to-staging.yml @@ -1,26 +1,23 @@ name: Deploy plugin to Staging -concurrency: staging - on: push: branches: - staging jobs: + Linting: + uses: ./.github/workflows/linting.yml + Deploy: name: FTP-Deploy-Action runs-on: ubuntu-latest - + needs: Linting steps: - uses: actions/checkout@v3 with: fetch-depth: 2 - - name: Linting - id: linting - uses: ./.github/workflows/linting.yml - name: FTP-Deploy-Action - if: steps.linting.outcome == 'success' uses: Automattic/FTP-Deploy-Action@3.1.2 with: ftp-server: sftp://sftp.wp.com/htdocs/wp-content/plugins/custom-plugin/ From 7b9b975f21eeba87e709f8d9a864ce8459e1adb7 Mon Sep 17 00:00:00 2001 From: Ryan Welcher Date: Thu, 6 Feb 2025 15:34:26 -0500 Subject: [PATCH 2/2] Add concurrency back. --- .github/workflows/deploy-to-staging.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/deploy-to-staging.yml b/.github/workflows/deploy-to-staging.yml index 61c124f..5ec3e42 100644 --- a/.github/workflows/deploy-to-staging.yml +++ b/.github/workflows/deploy-to-staging.yml @@ -1,5 +1,7 @@ name: Deploy plugin to Staging +concurrency: staging + on: push: branches: