From b93a642eebc57d22b21e585965b804d265958fd5 Mon Sep 17 00:00:00 2001 From: Typhonragewind Date: Thu, 22 Jun 2023 11:13:31 +0100 Subject: [PATCH] Create action to build images --- .github/workflows/main.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..f8b6aaf --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,31 @@ +name: Build Images + +on: + schedule: + - cron: "0 16 * * 6" + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: checout code + uses: actions/checkout@v2 + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version: 18.x + cache: npm + - name: install buildx + id: buildx + uses: crazy-max/ghaction-docker-buildx@v1 + with: + version: latest + - name: login to dockerhub + run: echo "${{ secrets.DOCKERHUB_KEY }}" | docker login -u "${{ secrets.DOCKERHUB_USER }}" --password-stdin + - name: build the images + run: | + docker buildx build --push \ + --tag typhonragewind/meshcentral:test \ + --tag typhonragewind/meshcentral:test_$(npm show meshcentral version) + --platform linux/amd64,linux/arm/v7,linux/arm64 /builds/regular