Skip to content

Commit 8a206d5

Browse files
committed
chore: publish built main branch
1 parent 7675e9a commit 8a206d5

File tree

8 files changed

+64
-50
lines changed

8 files changed

+64
-50
lines changed

.github/workflows/build_container.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ on:
44
workflow_dispatch:
55
inputs:
66
tag:
7-
description: 'Tag to mimic Git tag.'
7+
description: "Tag to mimic Git tag."
88
required: true
9-
default: 'v1.0.0'
9+
default: "v1.0.0"
1010
type: string
1111

1212
permissions:
@@ -25,7 +25,7 @@ jobs:
2525

2626
- uses: actions/setup-node@v4
2727
with:
28-
node-version-file: 'package.json'
28+
node-version-file: "package.json"
2929

3030
- run: npm ci
3131

@@ -49,21 +49,21 @@ jobs:
4949
uses: docker/metadata-action@v5
5050
id: meta
5151
with:
52-
images: |
53-
ghcr.io/nerivec/zigbee2mqtt-windfront
54-
tags: |
55-
type=semver,pattern={{version}},value=${{ inputs.tag }}
56-
type=semver,pattern={{major}}.{{minor}},value=${{ inputs.tag }}
57-
type=semver,pattern={{major}},value=${{ inputs.tag }}
52+
images: |
53+
ghcr.io/nerivec/zigbee2mqtt-windfront
54+
tags: |
55+
type=semver,pattern={{version}},value=${{ inputs.tag }}
56+
type=semver,pattern={{major}}.{{minor}},value=${{ inputs.tag }}
57+
type=semver,pattern={{major}},value=${{ inputs.tag }}
5858
5959
- name: Docker build and push
6060
uses: docker/build-push-action@v6
6161
with:
62-
context: .
63-
file: Dockerfile
64-
platforms: linux/arm64/v8,linux/amd64,linux/arm/v6,linux/arm/v7,linux/riscv64,linux/386
65-
tags: ${{ steps.meta.outputs.tags }}
66-
push: true
67-
build-args: |
68-
VERSION=${{ inputs.tag }}
69-
DATE=${{ github.event.repository.updated_at }}
62+
context: .
63+
file: Dockerfile
64+
platforms: linux/arm64/v8,linux/amd64,linux/arm/v6,linux/arm/v7,linux/riscv64,linux/386
65+
tags: ${{ steps.meta.outputs.tags }}
66+
push: true
67+
build-args: |
68+
VERSION=${{ inputs.tag }}
69+
DATE=${{ github.event.repository.updated_at }}

.github/workflows/check-i18n.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Check i18n
22

33
on:
44
pull_request:
5-
paths: ['src/i18n/locales/**', '!src/i18n/locales/en.json']
5+
paths: ["src/i18n/locales/**", "!src/i18n/locales/en.json"]
66

77
permissions:
88
contents: read
@@ -15,7 +15,7 @@ jobs:
1515

1616
- uses: actions/setup-node@v4
1717
with:
18-
node-version-file: 'package.json'
18+
node-version-file: "package.json"
1919

2020
- run: npm ci
2121

.github/workflows/ci.yml

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
- uses: actions/setup-node@v4
2727
with:
28-
node-version-file: 'package.json'
28+
node-version-file: "package.json"
2929

3030
- run: npm ci
3131

@@ -59,25 +59,25 @@ jobs:
5959
uses: docker/metadata-action@v5
6060
id: meta
6161
with:
62-
images: |
63-
ghcr.io/nerivec/zigbee2mqtt-windfront
64-
tags: |
65-
type=semver,pattern={{version}}
66-
type=semver,pattern={{major}}.{{minor}}
67-
type=semver,pattern={{major}}
62+
images: |
63+
ghcr.io/nerivec/zigbee2mqtt-windfront
64+
tags: |
65+
type=semver,pattern={{version}}
66+
type=semver,pattern={{major}}.{{minor}}
67+
type=semver,pattern={{major}}
6868
6969
- name: Docker build and push
7070
if: startsWith(github.ref, 'refs/tags/') && github.event_name == 'push'
7171
uses: docker/build-push-action@v6
7272
with:
73-
context: .
74-
file: Dockerfile
75-
platforms: linux/arm64/v8,linux/amd64,linux/arm/v6,linux/arm/v7,linux/riscv64,linux/386
76-
tags: ${{ steps.meta.outputs.tags }}
77-
push: true
78-
build-args: |
79-
VERSION=${{ github.ref_name }}
80-
DATE=${{ github.event.repository.updated_at }}
73+
context: .
74+
file: Dockerfile
75+
platforms: linux/arm64/v8,linux/amd64,linux/arm/v6,linux/arm/v7,linux/riscv64,linux/386
76+
tags: ${{ steps.meta.outputs.tags }}
77+
push: true
78+
build-args: |
79+
VERSION=${{ github.ref_name }}
80+
DATE=${{ github.event.repository.updated_at }}
8181
8282
- name: Add tarball dist to release assets
8383
if: startsWith(github.ref, 'refs/tags/') && github.event_name == 'push'
@@ -87,3 +87,17 @@ jobs:
8787
gh release upload ${{ github.ref_name }} zigbee2mqtt-windfront-${{ github.ref_name }}.tar.gz
8888
env:
8989
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
90+
91+
- name: Publish built main branch
92+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
93+
run: |
94+
temp_dir=$(mktemp -d)
95+
cp -R dist/. $temp_dir
96+
git switch --orphan built-main
97+
rm -rf ./*
98+
cp -R $temp_dir/* .
99+
git add -A
100+
git config --local user.name 'github-actions[bot]'
101+
git config --local user.email 'github-actions[bot]@users.noreply.github.com'
102+
git commit -m "$GITHUB_SHA" || echo 'Nothing to commit'
103+
git push --force --set-upstream origin built-main

.github/workflows/create-tarball.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_dispatch:
55
inputs:
66
release_tag:
7-
description: 'Release tag'
7+
description: "Release tag"
88
required: true
99

1010
permissions:
@@ -20,7 +20,7 @@ jobs:
2020

2121
- uses: actions/setup-node@v4
2222
with:
23-
node-version-file: 'package.json'
23+
node-version-file: "package.json"
2424

2525
- run: npm ci
2626

.github/workflows/i18n.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Update i18n EN translations
22

33
on:
44
schedule:
5-
- cron: '0 12 * * 3'
5+
- cron: "0 12 * * 3"
66
workflow_dispatch:
77

88
permissions:
@@ -18,7 +18,7 @@ jobs:
1818

1919
- uses: actions/setup-node@v4
2020
with:
21-
node-version-file: 'package.json'
21+
node-version-file: "package.json"
2222

2323
- run: npm ci
2424

@@ -30,8 +30,8 @@ jobs:
3030

3131
- name: Commit changes
3232
run: |
33-
git config --global user.name 'github-actions[bot]'
34-
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
35-
git add ./src/i18n/locales/en.json
36-
git commit -m "fix: update i18n EN translations" -m "cc: @Nerivec @Nicooow (fr) @domotick (fr)" || echo 'Nothing to commit'
37-
git push
33+
git config --global user.name 'github-actions[bot]'
34+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
35+
git add ./src/i18n/locales/en.json
36+
git commit -m "fix: update i18n EN translations" -m "cc: @Nerivec @Nicooow (fr) @domotick (fr)" || echo 'Nothing to commit'
37+
git push

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ jobs:
1919
# Setup .npmrc file to publish to npm
2020
- uses: actions/setup-node@v4
2121
with:
22-
node-version-file: 'package.json'
23-
registry-url: 'https://registry.npmjs.org'
22+
node-version-file: "package.json"
23+
registry-url: "https://registry.npmjs.org"
2424

2525
- run: npm ci
2626

.github/workflows/stale.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
name: 'Close stale issues and PRs'
1+
name: "Close stale issues and PRs"
22
on:
33
schedule:
4-
- cron: '30 4 * * *'
4+
- cron: "30 4 * * *"
55

66
permissions:
77
contents: read
@@ -16,8 +16,8 @@ jobs:
1616
steps:
1717
- uses: actions/stale@v9
1818
with:
19-
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
20-
stale-pr-message: 'This pull request is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
19+
stale-issue-message: "This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days."
20+
stale-pr-message: "This pull request is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days."
2121
days-before-stale: 30
2222
days-before-close: 5
2323
exempt-issue-labels: dont-stale

.github/workflows/storybook-ghpages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121

2222
- uses: actions/setup-node@v4
2323
with:
24-
node-version-file: 'package.json'
24+
node-version-file: "package.json"
2525

2626
- uses: bitovi/github-actions-storybook-to-github-pages@v1.0.3
2727
with:

0 commit comments

Comments
 (0)