mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-22 10:42:49 +00:00
Small Fix: Release_Channels permissions (#5852)
This commit is contained in:
38
.github/workflows/hook_copr.yml
vendored
38
.github/workflows/hook_copr.yml
vendored
@@ -38,38 +38,24 @@ jobs:
|
|||||||
|
|
||||||
project_name = "${{ inputs.copr_project }}"
|
project_name = "${{ inputs.copr_project }}"
|
||||||
if project_name == "daily":
|
if project_name == "daily":
|
||||||
hook_secret = "${{ secrets.COPR_HOOK_DAILY }}"
|
hook_secret = "${{ secrets.COPR_HOOK_DAILY }}"
|
||||||
project_id = 160277
|
project_id = 160277
|
||||||
elif project_name == "alpha":
|
elif project_name == "alpha":
|
||||||
hook_secret = "${{ secrets.COPR_HOOK_ALPHA }}"
|
hook_secret = "${{ secrets.COPR_HOOK_ALPHA }}"
|
||||||
project_id = 160278
|
project_id = 160278
|
||||||
elif project_name == "beta":
|
elif project_name == "beta":
|
||||||
hook_secret = "${{ secrets.COPR_HOOK_BETA }}"
|
hook_secret = "${{ secrets.COPR_HOOK_BETA }}"
|
||||||
project_id = 160279
|
project_id = 160279
|
||||||
else:
|
else:
|
||||||
raise ValueError(f"Unknown COPR project: {project_name}")
|
raise ValueError(f"Unknown COPR project: {project_name}")
|
||||||
|
|
||||||
webhook_url = f"https://copr.fedorainfracloud.org/webhooks/github/{project_id}/{hook_secret}/meshtasticd/"
|
webhook_url = f"https://copr.fedorainfracloud.org/webhooks/github/{project_id}/{hook_secret}/meshtasticd/"
|
||||||
copr_payload = {
|
copr_payload = {
|
||||||
"event": "push",
|
"ref": "${{ github.ref }}",
|
||||||
"payload": {
|
"after": "${{ github.sha }}",
|
||||||
"ref": "${{ github.ref }}",
|
"repository": {
|
||||||
"after": "${{ github.sha }}",
|
"clone_url": "${{ github.server_url }}/${{ github.repository }}.git",
|
||||||
"repository": {
|
|
||||||
"id": "${{ github.repository_id }}",
|
|
||||||
"full_name": "${{ github.repository }}",
|
|
||||||
"git_url": "${{ github.repositoryUrl }}",
|
|
||||||
"owner": {
|
|
||||||
"name": "${{ github.repository_owner }}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"pusher": {
|
|
||||||
"name": "${{ github.actor }}"
|
|
||||||
},
|
|
||||||
"sender": {
|
|
||||||
"login": "github-actions[bot]"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
r = requests.post(webhook_url, json=copr_payload)
|
r = requests.post(webhook_url, json=copr_payload, headers={"X-GitHub-Event": "push"})
|
||||||
r.raise_for_status()
|
r.raise_for_status()
|
||||||
|
|||||||
4
.github/workflows/release_channels.yml
vendored
4
.github/workflows/release_channels.yml
vendored
@@ -4,7 +4,9 @@ on:
|
|||||||
release:
|
release:
|
||||||
types: [published, released]
|
types: [published, released]
|
||||||
|
|
||||||
permissions: read-all
|
permissions:
|
||||||
|
contents: write
|
||||||
|
packages: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
package-ppa:
|
package-ppa:
|
||||||
|
|||||||
Reference in New Issue
Block a user