Skip to content

Commit 1a5adfe

Browse files
authored
Merge pull request #7 from FlowFuse/release-action
Add release Action
2 parents 9248cf2 + ac4fae5 commit 1a5adfe

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

.github/workflows/release-publish.yml

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Release Publish
2+
on:
3+
push:
4+
tags:
5+
- "v*.*.*"
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-node@v4
13+
with:
14+
node-version: 18
15+
- run: npm ci
16+
- uses: JS-DevTools/[email protected]
17+
with:
18+
token: ${{ secrets.NPM_PUBLISH_TOKEN }}
19+
build_container:
20+
needs: [publish]
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: checkout
24+
uses: actions/checkout@v4
25+
- name: Docker Meta Data
26+
uses: docker/metadata-action@v5
27+
id: meta
28+
with:
29+
tags: |
30+
type=semver,event=tag,pattern={{version}}
31+
flavor: |
32+
latest=true
33+
images: |
34+
flowfuse/mqtt-schema-agent
35+
- name: Setup QEMU
36+
uses: docker/[email protected]
37+
- name: Setup Docker Buildx
38+
uses: docker/[email protected]
39+
- name: Docker login
40+
uses: docker/[email protected]
41+
with:
42+
username: flowfuse
43+
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
44+
- name: Build and Push
45+
uses: docker/[email protected]
46+
with:
47+
context: docker
48+
file: docker/Dockerfile
49+
tags: ${{ steps.meta.outputs.tags }}
50+
push: true
51+
platforms: linux/amd64, linux/arm64, linux/arm/v7
52+
- name: Publish README.md to Docker Hub
53+
uses: peter-evans/dockerhub-description@v4
54+
with:
55+
repository: flowfuse/mqtt-schema-agent
56+
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
57+
readme-filepath: ./docker/README.md

0 commit comments

Comments
 (0)