Add docker-build.yml for building docker image on PRs
MODIFY
.github/workflows/docker-build.yml
.github/workflows/docker-build.yml
name: Build docker image
-on:
- push:
- branches:
- - master
- workflow_dispatch:
+on: [push, pull_request]
jobs:
docker:
@@ -14,17 +10,9 @@ jobs:
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- -
- name: Login to DockerHub
- uses: docker/login-action@v1
- with:
- username: mortbopet
- password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v2
with:
file: "./docker/ripes.dockerfile"
context: "./docker/"
- push: true
- tags: mortbopet/ripes:latest

ADD
.github/workflows/docker-deploy.yml
+name: Build and deploy docker image
+on:
+ push:
+ branches:
+ - master
+ workflow_dispatch:
+
+jobs:
+ docker:
+ runs-on: ubuntu-latest
+ steps:
+ -
+ uses: actions/checkout@v2
+ -
+ name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v1
+ -
+ name: Login to DockerHub
+ uses: docker/login-action@v1
+ with:
+ username: mortbopet
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
+ -
+ name: Build and push
+ uses: docker/build-push-action@v2
+ with:
+ file: "./docker/ripes.dockerfile"
+ context: "./docker/"
+ push: true
+ tags: mortbopet/ripes:latest

Add docker-build.yml for building docker image on PRs