From 0e83d6581c58621e784eef4bfa8863cf83a7488d Mon Sep 17 00:00:00 2001 From: Ernst Noorlander Date: Sat, 13 Apr 2024 14:04:32 +0200 Subject: [PATCH] Create docker-deploy.yml --- .github/workflows/docker-deploy.yml | 34 +++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/docker-deploy.yml diff --git a/.github/workflows/docker-deploy.yml b/.github/workflows/docker-deploy.yml new file mode 100644 index 0000000..f7aa1fc --- /dev/null +++ b/.github/workflows/docker-deploy.yml @@ -0,0 +1,34 @@ +name: Build and Push Docker image + +on: + push: + branches: + - main + +jobs: + build-and-push: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Log in to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + + - name: Build and push Docker image + uses: docker/build-push-action@v2 + with: + push: true + tags: ictu/zap2docker-weekly:latest + + - name: Update README on Docker Hub + uses: peter-evans/dockerhub-description@v2 + env: + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} + DOCKERHUB_REPOSITORY: ictu/zap2docker-weekly + README_FILEPATH: ./README.md