From cbcaa81c737f1ef76e009cbc7c1a0ab2a0d3abb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Busse?= Date: Mon, 28 Sep 2020 19:43:44 +0200 Subject: [PATCH] Add github-actions --- .github/dependabot.yml | 7 +++++ .github/workflows/docker-image.yml | 42 ++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/docker-image.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..2c7d170 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: + # Maintain dependencies for GitHub Actions + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 0000000..176e0ae --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,42 @@ +name: Docker Image CI + +on: + push: + branches: [ master ] + paths-ignore: + - '**.md' + pull_request: + branches: [ master ] + paths-ignore: + - '**.md' + +jobs: + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GHCR_TOKEN }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Build and push to ghcr + id: docker_build + uses: docker/build-push-action@v2 + with: + platforms: linux/arm64 + push: true + tags: ghcr.io/bbusse/hbase-exporter:latest + + - name: Image digest + run: echo ${{ steps.docker_build.outputs.digest }}