From 5471f9adf90bdcac118aa9fb65ffab216e2db2b2 Mon Sep 17 00:00:00 2001 From: bcopy <500789+bcopy@users.noreply.github.com> Date: Thu, 16 Jun 2022 11:51:22 +0200 Subject: [PATCH] Add multiplatform support --- .github/workflows/build-action.yml | 40 ++++++++++++++++++------------ 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build-action.yml b/.github/workflows/build-action.yml index 45dc4df..78a81eb 100644 --- a/.github/workflows/build-action.yml +++ b/.github/workflows/build-action.yml @@ -9,12 +9,18 @@ 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 @@ -22,17 +28,17 @@ jobs: # 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 @@ -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