Merge pull request #333 from FlowFuse/device-agent-3.0.2 #51
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/npm-publish@v3.1.1 | |
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/setup-qemu-action@v3.2.0 | |
- name: Setup Docker buildx | |
uses: docker/setup-buildx-action@v3.8.0 | |
- name: docker login | |
uses: docker/login-action@v3.3.0 | |
with: | |
username: flowfuse | |
password: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
- name: Build and push FlowFuse Device Agent container | |
uses: docker/build-push-action@v6.10.0 | |
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/npm-publish@v3.1.1 | |
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/setup-qemu-action@v3.2.0 | |
- name: Setup Docker buildx | |
uses: docker/setup-buildx-action@v3.8.0 | |
- name: docker login | |
uses: docker/login-action@v3.3.0 | |
with: | |
username: flowforge | |
password: ${{ secrets.DOCKER_HUB_PASSWORD_FLOWFORGE }} | |
- name: Build and push FlowFuse Device Agent container | |
uses: docker/build-push-action@v6.10.0 | |
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 |