tungbq / devops-toolkit

🐳 Container image for an all-in-one DevOps environment with popular tools like Ansible, Terraform, kubectl, Helm, AWS CLI, Azure CLI, Git, Python and more.
https://hub.docker.com/r/tungbq/devops-toolkit
Apache License 2.0
45 stars 16 forks source link

ci: Cancel previous runs in the PR when you push new commits (update the current) #86

Closed tungbq closed 6 months ago

tungbq commented 6 months ago

To save the running resource, we could cancel the current run when there has new commit pushed to the pull requet.

Workflow to update:

Basically this task could be completed by adding:

concurrency: 
  group: ${{ github.head_ref }}
  cancel-in-progress: true

Doc: https://stackoverflow.com/a/67939898