Skip to content

Commit

Permalink
chore: revert validator actor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
saikumarrs committed Dec 27, 2024
1 parent c851596 commit 9f774c1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 51 deletions.
22 changes: 1 addition & 21 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,9 @@ on:
- closed

jobs:
validate-actor:
# Run only for workflow_dispatch events
if: github.event_name == 'workflow_dispatch'
uses: ./.github/workflows/validate-actor.yml
secrets:
PAT: ${{ secrets.PAT }}

deploy:
needs: [validate-actor]
name: Deploy to Development Environment
if: >
(
github.event_name == 'pull_request' &&
github.event.pull_request.merged == true
) ||
(
github.event_name == 'workflow_dispatch' &&
(
startsWith(github.ref, 'refs/tags/v') ||
github.ref == 'refs/heads/develop' ||
github.ref == 'refs/heads/main'
)
)
if: github.event.pull_request.merged == true
uses: ./.github/workflows/deploy.yml
with:
environment: 'development'
Expand Down
17 changes: 1 addition & 16 deletions .github/workflows/deploy-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,11 @@ env:
NODE_OPTIONS: '--no-warnings'

jobs:
validate-actor:
# Run validation for workflow_dispatch
if: github.event_name == 'workflow_dispatch'
uses: ./.github/workflows/validate-actor.yml
secrets:
PAT: ${{ secrets.PAT }}

deploy:
needs: [validate-actor]
name: Deploy to NPM
# As we publish the NPM package with provenance, we must use GitHub-hosted runners
runs-on: ubuntu-latest
# Deploy if validate-actor was successful or skipped
# or if the workflow was invoked by another workflow
if: >
inputs.is_called == 'true' ||
(
github.event_name == 'workflow_dispatch' &&
startsWith(github.ref, 'refs/tags/v')
)
if: ${{ inputs.is_called == 'true' || (github.event_name == 'workflow_dispatch' && startsWith(github.ref, 'refs/tags/v')) }}

steps:
- name: Checkout
Expand Down
17 changes: 3 additions & 14 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,11 @@ on:
- reopened

jobs:
validate-actor:
if: github.event_name == 'workflow_dispatch'
uses: ./.github/workflows/validate-actor.yml
secrets:
PAT: ${{ secrets.PAT }}

deploy:
needs: [validate-actor]
name: Deploy to staging environment
if: >
(needs.validate-actor.result == 'success' || needs.validate-actor.result == 'skipped') &&
(
startsWith(github.ref, 'refs/tags/v') ||
startsWith(github.head_ref, 'hotfix-release/') ||
startsWith(github.head_ref, 'release/')
)
# Only manually run the workflow for tags
# and PRs raised from release branches to main
if: startsWith(github.ref, 'refs/tags/v') || startsWith(github.head_ref, 'hotfix-release/') || startsWith(github.head_ref, 'release/')
uses: ./.github/workflows/deploy.yml
with:
environment: 'staging'
Expand Down

0 comments on commit 9f774c1

Please sign in to comment.