Skip to content

Merge pull request #333 from FlowFuse/device-agent-3.0.2 #51

Merge pull request #333 from FlowFuse/device-agent-3.0.2

Merge pull request #333 from FlowFuse/device-agent-3.0.2 #51

Workflow file for this run

name: Release Published
on:
push:
tags:
- "v*.*.*"
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- run: npm ci
- uses: JS-DevTools/[email protected]
with:
token: ${{ secrets.NPM_PUBLISH_TOKEN }}
build_container:
needs: [publish]
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: Docker Meta Data
id: meta
uses: docker/metadata-action@v5
with:
tags: |
type=semver,event=tag,pattern={{version}}
flavor: |
latest=true
images: |
flowfuse/device-agent
- name: Setup QEMU
uses: docker/[email protected]
- name: Setup Docker buildx
uses: docker/[email protected]
- name: docker login
uses: docker/[email protected]
with:
username: flowfuse
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Build and push FlowFuse Device Agent container
uses: docker/[email protected]
with:
context: docker
file: docker/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
push: true
platforms: linux/amd64, linux/arm64, linux/arm/v7
- name: Publish README.md to Docker hub
uses: peter-evans/dockerhub-description@v4
with:
repository: flowfuse/device-agent
username: flowfuse
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
readme-filepath: ./docker/README.md
publish_legacy:
needs: [publish]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
- name: "Install jq"
run: sudo apt-get install -y jq
- name: "Patch module name"
run: |
cat package.json | jq '.name = "@flowforge/flowforge-device-agent"' > package.json-patched
mv package.json-patched package.json
- run: npm install
- uses: JS-DevTools/[email protected]
with:
token: ${{ secrets.NPM_PUBLISH_TOKEN_FLOWFORGE }}
- name: Docker Meta Data
id: meta
uses: docker/metadata-action@v5
with:
tags: |
type=semver,event=tag,pattern={{version}}
flavor: |
latest=true
images: |
flowforge/device-agent
- name: Setup QEMU
uses: docker/[email protected]
- name: Setup Docker buildx
uses: docker/[email protected]
- name: docker login
uses: docker/[email protected]
with:
username: flowforge
password: ${{ secrets.DOCKER_HUB_PASSWORD_FLOWFORGE }}
- name: Build and push FlowFuse Device Agent container
uses: docker/[email protected]
with:
context: docker
file: docker/Dockerfile_flowforge
tags: ${{ steps.meta.outputs.tags }}
push: true
platforms: linux/amd64, linux/arm64, linux/arm/v7
- name: Publish README.md to Docker hub
uses: peter-evans/dockerhub-description@v4
with:
repository: flowforge/device-agent
username: flowforge
password: ${{ secrets.DOCKER_HUB_PASSWORD_FLOWFORGE }}
readme-filepath: ./docker/README.md