-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (45 loc) · 1.31 KB
/
publisher.yaml
File metadata and controls
51 lines (45 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: "Publish"
on:
release:
types: [published]
workflow_dispatch:
workflow_call:
inputs:
version:
required: false
type: string
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
arch: ["amd64", "aarch64"]
steps:
- name: Checkout the repository
uses: actions/checkout@v6.0.2
- name: Get version
run: |
version=${{ inputs.version }}
if [ -n "$version" ]; then
echo "latest_release=$version" >> $GITHUB_ENV
else
echo "latest_release=$(curl --header "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" --silent https://api.github.com/repos/$GITHUB_REPOSITORY/releases/latest | jq -r .tag_name | sed s/v// )" >> $GITHUB_ENV
fi
- name: Login to GitHub Container Registry
uses: docker/login-action@v4.0.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and publish
uses: home-assistant/builder@2026.03.2
with:
args: |
--${{ matrix.arch }} \
--version ${{ env.latest_release }} \
--target /data/ \
--addon