Skip to content

Commit

Permalink
Merge pull request #15 from Krzysztof-Szyper-Epam/refactor
Browse files Browse the repository at this point in the history
Try to build image on pull request. Refactor workflow names.
  • Loading branch information
ChristophShyper authored Dec 3, 2019
2 parents c8c438a + 9b82ef3 commit 271fed9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build on pull request
name: On pull request

on:
pull_request:
Expand All @@ -21,6 +21,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TARGET: Dockerfile

- name: Build Docker image
if: github.actor == 'Krzysztof-Szyper-Epam'
- name: Build Docker image (conditional)
if: github.actor == 'Krzysztof-Szyper-Epam' || github.actor == 'github-actions'
run: make docker-build
10 changes: 6 additions & 4 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and push to Docker Hub
name: On commit push

on:
push:
Expand All @@ -18,17 +18,19 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TARGET: Dockerfile

- name: Build and push Docker image
- name: Build and push Docker image (conditional)
if: github.actor == 'Krzysztof-Szyper-Epam' && github.ref == 'refs/heads/master'
env:
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
run: make build-and-push

- name: Create pull request
- name: Create pull request (conditional)
if: github.actor == 'Krzysztof-Szyper-Epam' && github.ref != 'refs/heads/master'
uses: repo-sync/pull-request@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
pr_label: "auto-pull-request"
pr_body: "*Automated pull request*"
pr_title: "Auto: ${{ github.event.commits[0].message }}"
pr_title: "${{ github.event.commits[0].message }}"
pr_reviewer: "Krzysztof-Szyper-Epam"
pr_assignee: "Krzysztof-Szyper-Epam"
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Docker image with Terraform/Terragrunt and all needed components to easily manage AWS infrastructure.

[![GitHub krzysztof-szyper-epam/docker-terragrunt](https://img.shields.io/badge/github-krzysztof--szyper--epam%2Fdocker--terragrunt-blue.svg)](https://github.com/krzysztof-szyper-epam/docker-terragrunt "shields.io")
[![Actions Status](https://github.com/Krzysztof-Szyper-Epam/docker-terragrunt/workflows/Build%20and%20push%20to%20Docker%20Hub/badge.svg)](https://github.com/Krzysztof-Szyper-Epam/docker-terragrunt/actions?query=workflow%3A%22Build+and+push+to+Docker+Hub%22 "github.com")
[![Actions Status](https://github.com/Krzysztof-Szyper-Epam/docker-terragrunt/workflows/Build%20on%20pull%20request/badge.svg)](https://github.com/Krzysztof-Szyper-Epam/docker-terragrunt/actions?query=workflow%3A%22Build+on+pull+request%22 "github.com")
[![Actions Status](https://github.com/Krzysztof-Szyper-Epam/docker-terragrunt/workflows/On%20commit%20push/badge.svg)](https://github.com/Krzysztof-Szyper-Epam/docker-terragrunt/actions?query=workflow%3A%22On+commit+push%22 "github.com")
[![Actions Status](https://github.com/Krzysztof-Szyper-Epam/docker-terragrunt/workflows/On%20pull%20request/badge.svg)](https://github.com/Krzysztof-Szyper-Epam/docker-terragrunt/actions?query=workflow%3A%22On+pull+request%22 "github.com")
![GitHub](https://img.shields.io/github/license/krzysztof-szyper-epam/docker-terragrunt "shields.io")
<br>
![GitHub last commit](https://img.shields.io/github/last-commit/krzysztof-szyper-epam/docker-terragrunt "shields.io")
Expand Down

0 comments on commit 271fed9

Please sign in to comment.