Skip to content

Commit

Permalink
Add multiplatform support
Browse files Browse the repository at this point in the history
  • Loading branch information
bcopy committed Jun 16, 2022
1 parent eefc31f commit 5471f9a
Showing 1 changed file with 24 additions and 16 deletions.
40 changes: 24 additions & 16 deletions .github/workflows/build-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,36 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Install npm dependencies
run: npm install
# - name: Install npm dependencies
# run: npm install

- name: Build & run
run: docker build .
# - name: Build & run
# run: docker build .

# - name: SonarCloud Scan
# uses: sonarsource/sonarcloud-github-action@master
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

- name: Start Mosquitto
uses: namoshek/mosquitto-github-action@v1
with:
version: '1.6'
ports: '1883:1883 9001:9001'
certificates: ${{ github.workspace }}/modules/web-ui/.ci/tls-certificates
config: ${{ github.workspace }}/modules/web-ui/.ci/mosquitto.conf
container-name: 'mqtt'
# - name: Start Mosquitto
# uses: namoshek/mosquitto-github-action@v1
# with:
# version: '1.6'
# ports: '1883:1883 9001:9001'
# certificates: ${{ github.workspace }}/modules/web-ui/.ci/tls-certificates
# config: ${{ github.workspace }}/modules/web-ui/.ci/mosquitto.conf
# container-name: 'mqtt'

- name: Wait a bit until MQTT broker has started
run: sleep 30
# - name: Wait a bit until MQTT broker has started
# run: sleep 30

# - name: Cypress Test
# run: npm run cytest
Expand All @@ -45,16 +51,18 @@ jobs:
password: ${{ secrets.GHCR_PAT }}

- name: Push Web UI container to GHCR
uses: docker/build-push-action@v2
uses: docker/build-push-action@v3
with:
context: ./modules/web-ui
platforms: linux/amd64,linux/arm
push: true
tags: ghcr.io/cmcrobotics/microsquad-web-ui:latest

- name: Push Web UI container to GHCR
uses: docker/build-push-action@v2
uses: docker/build-push-action@v3
with:
context: ./modules/gateway
platforms: linux/amd64,linux/arm
push: true
tags: ghcr.io/cmcrobotics/microsquad-gateway:latest

0 comments on commit 5471f9a

Please sign in to comment.