This action checks, attaches and detaches the "Deploying" label of GitHub Issue that indicating the deployment status.
- Workflow: .github/workflows/example.yml
- Issue: #28
deploying-marker-with-issue
needs issue: write
permission.
permissions:
issues: write
Ref: Assigning permissions to jobs - GitHub Docs
Checks the Issue has not Deploying
label.
If the Issue already has Deploying
label and specified exit-with-error: true
, an error is raised.
For example, you want to check another deployment is not in progress.
- uses: Connehito/deploying-marker-with-issue@v2
env:
GITHUB_TOKEN: ${{ github.token }}
with:
action: "check-marker-detached"
issue-number: ${{ env.DEPLOYMENT_RECORD_ISSUE_NUMBER }}
exit-with-error: true # true = exit with error when the marker is already exists
Attach Deploying
label to the Issue.
If the Issue already has Deploying
label and specified exit-with-error: true
, an error is raised.
It is intended to be used at the start of a deployment.
- uses: Connehito/deploying-marker-with-issue@v2
env:
GITHUB_TOKEN: ${{ github.token }}
with:
action: "attach-marker"
issue-number: ${{ env.DEPLOYMENT_RECORD_ISSUE_NUMBER }}
exit-with-error: true # true = exit with error when the marker is already exists
Checks the Issue has Deploying
label.
If the Issue has not Deploying
label and specified exit-with-error: true
, an error is raised.
For example, you can use to check Deployment
label has not detached.
- uses: Connehito/deploying-marker-with-issue@v2
env:
GITHUB_TOKEN: ${{ github.token }}
with:
action: "check-marker-attached"
issue-number: ${{ env.DEPLOYMENT_RECORD_ISSUE_NUMBER }}
exit-with-error: false # true = exit with error when the marker is not exists
Detach Deploying
label to the Issue.
If the Issue has not Deploying
label and specified exit-with-error: true
, an error is raised.
It is intended to be used at the end of a deployment.
- uses: Connehito/deploying-marker-with-issue@v2
env:
GITHUB_TOKEN: ${{ github.token }}
with:
action: "detach-marker"
issue-number: ${{ env.DEPLOYMENT_RECORD_ISSUE_NUMBER }}
exit-with-error: false # true = exit with error when the marker is not exists
Checks the Issue has not Deploying
label or assigned actor.
If the issue has a Deploying
label or assigned user who is not the actor, and `exit-with-error: true' is specified, an error is raised.
For example, if you want to run consecutive deployments.
- uses: Connehito/deploying-marker-with-issue@main
env:
GITHUB_TOKEN: ${{ github.token }}
with:
action: "check-marker-detached-or-assigned-actor"
issue-number: ${{ env.DEPLOYMENT_RECORD_ISSUE_NUMBER }}
exit-with-error: true # true = exit with error when the marker is already exists and assigned a user who is not the actor