From 8742effb2d3200b50ddf381a3f0b7314c53f91d7 Mon Sep 17 00:00:00 2001 From: Cubxity Date: Sat, 2 Oct 2021 17:50:36 +0200 Subject: [PATCH 1/3] build(ci): added GitHub workflow --- .github/workflows/build.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 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..e64832b --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,30 @@ +name: Build +on: + push: + branches: [ "master" ] +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 \ No newline at end of file From e6821b740a750da446d4db8a88d348a9830f32e2 Mon Sep 17 00:00:00 2001 From: Cubxity Date: Sat, 2 Oct 2021 18:46:21 +0200 Subject: [PATCH 2/3] build(ci): pass MAXMIND_LICENSE_KEY as build arg --- .github/workflows/build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e64832b..50376a3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,4 +27,6 @@ jobs: with: push: true platforms: linux/amd64,linux/arm64 - tags: ghcr.io/${{ steps.vars.outputs.repository }}:latest \ No newline at end of file + tags: ghcr.io/${{ steps.vars.outputs.repository }}:latest + build-args: | + MAXMIND_LICENSE_KEY=${{ secrets.MAXMIND_LICENSE_KEY }} \ No newline at end of file From 17c1d33e4fc433b119efeb7bf218776380cc6913 Mon Sep 17 00:00:00 2001 From: Cubxity Date: Sat, 2 Oct 2021 18:48:49 +0200 Subject: [PATCH 3/3] build(ci): rebuild every day --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 50376a3..bf4d622 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,6 +2,8 @@ name: Build on: push: branches: [ "master" ] + schedule: + - cron: 0 0 * * * # Every day jobs: build: runs-on: ubuntu-latest