From f856087100b693cbed37e59c735d114540e40131 Mon Sep 17 00:00:00 2001 From: Ties de Kock Date: Tue, 22 Jun 2021 08:49:54 +0200 Subject: [PATCH] Add GitHub actions build for docker image * Add GitHub Actions build for docker image on docker hub. * Creates `rpki/stayrtr`, `rpki/rtrmon`, and `rpki/rtrdump` images (not all repositories exist at the moment). --- .github/workflows/docker.yml | 58 ++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflows/docker.yml diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..0340875 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,58 @@ +name: CI to Docker Hub +on: + push: + branches: [master] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Check Out Repo + uses: actions/checkout@v2 + + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v1 + + - name: Build and push (stayrtr) + id: docker_build_stayrtr + uses: docker/build-push-action@v2 + with: + context: ./ + file: ./Dockerfile.stayrtr.prod + push: true + tags: rpki/stayrtr:latest + + - name: Image digest (stayrtr) + run: echo ${{ steps.docker_build_stayrtr.outputs.digest }} + + - name: Build and push (rtrmon) + id: docker_build_rtrmon + uses: docker/build-push-action@v2 + with: + context: ./ + file: ./Dockerfile.rtrmon.prod + push: true + tags: rpki/rtrmon:latest + + - name: Image digest (rtrmon) + run: echo ${{ steps.docker_build_rtrmon.outputs.digest }} + + - name: Build and push rtrdump + id: docker_build_rtrdump + uses: docker/build-push-action@v2 + with: + context: ./ + file: ./Dockerfile.rtrdump.prod + push: true + tags: rpki/rtrdump:latest + + - name: Image digest (rtrdump) + run: echo ${{ steps.docker_build_rtrdump.outputs.digest }}