An open API service indexing awesome lists of open source software.

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

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:
....
```