diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..bf4d622 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,34 @@ +name: Build +on: + push: + branches: [ "master" ] + schedule: + - cron: 0 0 * * * # Every day +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 }} \ No newline at end of file