Skip to content

Commit

Permalink
Add GitHub actions build for docker image
Browse files Browse the repository at this point in the history
  * 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).
  • Loading branch information
ties authored and job committed Jul 19, 2021
1 parent d74e626 commit f856087
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -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 }}

0 comments on commit f856087

Please sign in to comment.