From ea865e886cff3142bd27a9a95da5b2d1b92afebd Mon Sep 17 00:00:00 2001 From: Xavier Stouder Date: Mon, 15 Aug 2022 13:01:00 +0200 Subject: [PATCH] build(ci): added GitHub workflow --- .github/workflows/build.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..0a72378 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,34 @@ +name: Build +on: + push: + branches: ['master'] + schedule: + - cron: 0 0 0 ? * SUN * +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - name: Log in to GitHub container registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Set variables + id: vars + run: | + echo ::set-output name=repository::${GITHUB_REPOSITORY,,} + - name: Build and push base image + uses: docker/build-push-action@v2 + with: + push: true + platforms: linux/amd64,linux/arm64 + tags: ghcr.io/${{ steps.vars.outputs.repository }}:latest + build-args: | + MAXMIND_LICENSE_KEY=${{ secrets.MAXMIND_LICENSE_KEY }}