Skip to content

Commit 5e3f73c

Browse files
committed
👷 Add addon-deploy actions
1 parent 0740a2b commit 5e3f73c

File tree

1 file changed

+40
-1
lines changed

1 file changed

+40
-1
lines changed

.github/workflows/addon-deploy.yaml

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ name: Deploy addon
33
# yamllint disable-line rule:truthy
44
on:
55
workflow_call:
6+
inputs:
7+
version:
8+
description: "The version to release"
9+
required: true
10+
type: string
611
secrets:
712
dispatch_token:
813
required: true
@@ -136,4 +141,38 @@ jobs:
136141
# Disable layer caching
137142
layers: false
138143

139-
# Todo: Publish to main repository
144+
- name: 🔑 GHCR Login
145+
uses: redhat-actions/podman-login@v1
146+
with:
147+
registry: ghcr.io
148+
username: ${{ github.repository_owner }}
149+
password: ${{ secrets.GITHUB_TOKEN }}
150+
151+
- name: ⤴️ Push images
152+
id: push-image
153+
uses: redhat-actions/push-to-registry@v2
154+
with:
155+
image: ${{ steps.build-image.outputs.image }}
156+
tags: ${{ steps.build-image.outputs.tags }}
157+
158+
publish-stable:
159+
name: 📢 Publish to stable repository
160+
runs-on: ubuntu-latest
161+
needs:
162+
- build-image
163+
- information
164+
environment: stable
165+
steps:
166+
- name: 📢 Dispatch Repository Updater update signal
167+
uses: peter-evans/repository-dispatch@v3
168+
with:
169+
token: ${{ secrets.DISPATCH_TOKEN }}
170+
repository: Poeschl-HomeAssistant-Addons/repository
171+
event-type: update
172+
client-payload: >
173+
{
174+
"addon": "${{ needs.information.outputs.slug }}",
175+
"name": "${{ needs.information.outputs.name }}",
176+
"repository": "${{ github.repository }}",
177+
"version": "${{ github.event.inputs.version }}"
178+
}

0 commit comments

Comments
 (0)