From df2da49efb917da2b3466cb8d508b1ca6fc55f54 Mon Sep 17 00:00:00 2001 From: Léo Vansimay Date: Fri, 16 Apr 2021 14:52:19 +0200 Subject: Create docker-image.yml First try for a yaml file to automatize the build and push of a docker image--- .github/workflows/docker-image.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/docker-image.yml (limited to '.github') diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 00000000..c0298502 --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,25 @@ +# code created with help of the github documentation : https://docs.github.com/en/actions/guides/publishing-docker-images + +name: Docker Image CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + + build-and-push: + name: Push Docker image to Docker Hub + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v2 + - name: Push to Docker Hub + uses: docker/build-push-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} #we can set these secrets with admin rights, so the code will adapt to the dockerHub account used + password: ${{ secrets.DOCKER_PASSWORD }} + repository: keleran/sec-certs #for now I wrote my repo + tag_with_ref: true -- cgit v1.3.1