Skip to content

chore(deps): update dependency libdyson-wg/ha-dyson to v1.3.2 #3180

chore(deps): update dependency libdyson-wg/ha-dyson to v1.3.2

chore(deps): update dependency libdyson-wg/ha-dyson to v1.3.2 #3180

Workflow file for this run

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@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- 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:2023.11.0@sha256:6785d286ffcb400e62d1a58499817a63ce2cf5b0d82d2352beb3c235512f710f
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@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.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 }}'
});