chore(deps): update homeassistant/home-assistant docker tag to v2024.12.3 #3937
Workflow file for this run
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.12.3@sha256:e20ca1d7b578cd98d6868aefa80ac2b4ade9826f14e10e3ea206975b8c6aeb8f | |
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 }}' | |
}); | |