Skip to content

Commit

Permalink
removed useless step
Browse files Browse the repository at this point in the history
  • Loading branch information
gioelemella committed Jan 20, 2025
1 parent 32e95a1 commit 3e85106
Showing 1 changed file with 1 addition and 35 deletions.
36 changes: 1 addition & 35 deletions .github/workflows/integration_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,38 +78,4 @@ jobs:
message_format: '{emoji} <{run_url}|{workflow}> {status_message} in <{repo_url}|{repo}> in ${{ inputs.environment }}'
footer: 'Linked to <{workflow_url}| workflow file>'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

delete_github_deployments:
runs-on: ubuntu-latest
needs: integration_test
if: ${{ always() }}
steps:
- name: Delete Previous deployments
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6
env:
SHA_HEAD: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.sha) || github.sha}}
with:
script: |
const { SHA_HEAD } = process.env
const deployments = await github.rest.repos.listDeployments({
owner: context.repo.owner,
repo: context.repo.repo,
sha: SHA_HEAD
});
await Promise.all(
deployments.data.map(async (deployment) => {
await github.rest.repos.createDeploymentStatus({
owner: context.repo.owner,
repo: context.repo.repo,
deployment_id: deployment.id,
state: 'inactive'
});
return github.rest.repos.deleteDeployment({
owner: context.repo.owner,
repo: context.repo.repo,
deployment_id: deployment.id
});
})
);
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

0 comments on commit 3e85106

Please sign in to comment.