chore(deps): update dependency blakeblackshear/frigate-hass-integration to v5.6.0 #3915
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: cd | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened, labeled] | |
concurrency: | |
group: cd-${{ github.event.pull_request.number }}-${{ github.event_name }} | |
cancel-in-progress: true | |
jobs: | |
# debug: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/github-script@7a5c598405937d486b0331594b5da2b14db670da # tag=v6.1.0 | |
# env: | |
# CURRENT_REF: ${{ github.event.pull_request.head.ref }} | |
# ENVIRONMENT: production | |
# with: | |
# script: | | |
# var deployments = await github.rest.repos.listDeployments({ | |
# ...context.repo, | |
# environment: process.env.ENVIRONMENT, | |
# }) | |
# for (const deployment of deployments.data) { | |
# if (deployment.ref == process.env.CURRENT_REF) { | |
# console.log(`deployment ${deployment.id} is for the current ref`); | |
# continue; | |
# } | |
# console.log(`querying status of deployment ${deployment.id}`); | |
# var statuses = await github.rest.repos.listDeploymentStatuses({ | |
# ...context.repo, | |
# deployment_id: deployment.id, | |
# }) | |
# for (const status of statuses.data) { | |
# console.log(`deployment ${deployment.id} status ${status.state}`); | |
# if (status.state == 'success' || status.state == 'in_progress' || status.state == 'pending' || status.state == 'queued') { | |
# var pulls = await github.rest.pulls.list({ | |
# ...context.repo, | |
# ref: context.repo.owner + ':' + deployment.ref, | |
# state: 'open' | |
# }); | |
# if (pulls.data.length > 0) { | |
# console.log(`deployment ${deployment.id} has open pull requests`); | |
# break; | |
# } | |
# } else { | |
# console.log("skipping") | |
# continue; | |
# } | |
# } | |
# } | |
validate-config: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Generate fake SSL cert | |
run: | | |
openssl req -x509 -newkey rsa:1024 -subj '/CN=example.com' -nodes -keyout key.pem -out cert.pem | |
- name: Test config | |
uses: docker://homeassistant/home-assistant:2024.11.2@sha256:2ddb0ceb186218e6daf423ac26be2e5a6ce1cd430c6064fe82d1d3d70b95cf38 | |
with: | |
entrypoint: ./script/cibuild | |
script-deploy: | |
runs-on: ubuntu-latest | |
needs: validate-config | |
if: | | |
( github.event.action == 'labeled' && github.event.label.name == 'deploy') || | |
( github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'deploy') ) | |
environment: production | |
concurrency: production | |
steps: | |
- name: deploy | |
run: 'true' | |
create-deploy-status: | |
runs-on: ubuntu-latest | |
needs: script-deploy | |
steps: | |
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 | |
with: | |
script: | | |
await github.rest.repos.createCommitStatus({ | |
...context.repo, | |
sha: context.payload.pull_request.head.sha, | |
state: 'success', | |
context: 'deploy', | |
description: 'PR was deployed with GitHub Actions', | |
target_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' | |
}); | |