https://github.com/utrustdev/action-should-deploy
Github Action: prevent deployments when the commit SHA and deployment SHA is the same
https://github.com/utrustdev/action-should-deploy
Last synced: 2 months ago
JSON representation
Github Action: prevent deployments when the commit SHA and deployment SHA is the same
- Host: GitHub
- URL: https://github.com/utrustdev/action-should-deploy
- Owner: utrustdev
- License: mit
- Created: 2021-07-20T10:47:25.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2023-03-01T17:56:13.000Z (about 3 years ago)
- Last Synced: 2024-11-19T17:04:03.258Z (over 1 year ago)
- Language: TypeScript
- Size: 573 KB
- Stars: 0
- Watchers: 10
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Github Action - Prevent deployments when no new changes
Prevent deployments when the commit SHA and deployment SHA is the same
## Usage
```
jobs:
deploy:
steps:
- name: Should Deploy?
id: should-deploy
uses: utrustdev/action-should-deploy@v0.1.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
```
## Output
```
jobs:
deploy:
steps:
....
- name: Get output
run: |
echo "output: ${{ steps.should-deploy.outputs.is_deployable }}"
echo "sha: ${{ steps.should-deploy.outputs.sha }}"
```
## Example
```
jobs:
deploy:
steps:
....
- name: Trigger Deploy
if: ${{ steps.should-deploy.outputs.is_deployable == 'true' }}
uses: ....
with:
....
```