-
-
Notifications
You must be signed in to change notification settings - Fork 61
61 lines (53 loc) · 1.38 KB
/
publish.yml
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
52
53
54
55
56
57
58
59
60
61
name: "Publish"
on:
release:
types: [published]
push:
branches:
- master
env:
GIT_TAG_NAME: dev
jobs:
init:
name: Initialize build
runs-on: ubuntu-latest
outputs:
architectures: ${{ steps.info.outputs.architectures }}
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Get information
id: info
uses: home-assistant/actions/helpers/info@master
publish:
name: Publish builder
needs: init
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
packages: write
strategy:
fail-fast: False
matrix:
architecture: ${{ fromJson(needs.init.outputs.architectures) }}
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- uses: olegtarasov/get-tag@v2.1.3
if: github.event_name == 'release'
name: Set tag envronment variable
- name: Login to GitHub Container Registry
uses: docker/login-action@v3.2.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Publish ${{ matrix.architecture }} builder
uses: ./
with:
args: |
--${{ matrix.architecture }} \
--target /data \
--cosign \
--generic $GIT_TAG_NAME