From 6fe0a0b73b24ebf0c94500363884ce157e070a85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Wed, 5 Jun 2024 21:12:46 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8F=AD=EF=B8=8F=20Set=20up=20automated=20?= =?UTF-8?q?builds?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/automated-build.yaml | 46 ++++++++++++++++++++++++++ hasher/Dockerfile | 2 +- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/automated-build.yaml diff --git a/.github/workflows/automated-build.yaml b/.github/workflows/automated-build.yaml new file mode 100644 index 0000000..8e082c8 --- /dev/null +++ b/.github/workflows/automated-build.yaml @@ -0,0 +1,46 @@ +name: Automated Build + +on: + push: + branches: + - main + +env: + DOCKER_BUILDKIT: 1 + +jobs: + push: + + runs-on: ubuntu-latest + if: github.event_name == 'push' + + permissions: + contents: read + packages: write + + steps: + - + uses: actions/checkout@v3 + + - + name: Log into GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ github.token }} + + - + uses: docker/setup-qemu-action@v3 + + - + uses: docker/setup-buildx-action@v3 + + - + name: hasher + uses: docker/build-push-action@v5 + with: + context: hasher + platforms: linux/amd64,linux/arm64,linux/arm/v7 + push: true + tags: ghcr.io/jpetazzo/dockercoins/hasher:v0.1 diff --git a/hasher/Dockerfile b/hasher/Dockerfile index 5ab8eed..6313a13 100644 --- a/hasher/Dockerfile +++ b/hasher/Dockerfile @@ -1,6 +1,6 @@ FROM ruby:alpine RUN apk add --update build-base curl -RUN gem install sinatra --version `~> 3` +RUN gem install sinatra --version '~> 3' RUN gem install thin ADD hasher.rb / CMD ["ruby", "hasher.rb"]