Skip to content

Commit

Permalink
ci: dont push docker images for PRs (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
schottra authored Sep 2, 2020
1 parent 2e209b0 commit 1448569
Showing 1 changed file with 4 additions and 23 deletions.
27 changes: 4 additions & 23 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,10 @@ name: Pull Request
on: pull_request

jobs:
build_push_github:
name: Build and push to Github
test_image_build:
name: Test build Docker image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Push Docker Image to Github Registry
uses: whoan/docker-build-with-cache-action@v5
with:
username: "${{ github.actor }}"
password: "${{ secrets.GITHUB_TOKEN }}"
image_name: ${{ secrets.package_name }}
image_tag: ${{ github.sha }}
registry: docker.pkg.github.com
build_push_dockerhub:
name: Build and push to Dockerhub
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Push Docker Image to Dockerhub
uses: whoan/docker-build-with-cache-action@v5
with:
username: "${{ secrets.DOCKERHUB_USERNAME }}"
password: "${{ secrets.DOCKERHUB_PASSWORD }}"
image_name: ${{ secrets.DOCKERHUB_IMAGE_NAME }}
image_tag: ${{ github.sha }}
build_extra_args: "--compress=true"
- name: Build image
run: docker build .

0 comments on commit 1448569

Please sign in to comment.