Skip to content

Commit

Permalink
Fixed conditions in actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristophShyper committed Apr 13, 2020
1 parent d77db7e commit 504c1fc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/CRON.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Check for update
name: Check for updates

on:
schedule:
Expand All @@ -11,15 +11,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v1 # Needs to be in v1 version otherwise will not work with pull-request@v2

- name: Build Docker image and push to registry
- name: Check for new tags
env:
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
TERM: xterm-256color
run: make check

- name: Commit and push changes
if: ${VERSION_TAG} != "n/a"
uses: ChristophShyper/action-commit-push@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/PUSH-OTHER.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
path: ./.github/PULL_REQUEST_TEMPLATE/DOCUMENTATION.md

- name: Read the template - other (conditional)
if: startsWith(github.ref, '!refs/heads/documentation') && startsWith(github.ref, '!refs/heads/enhancement')
if: startsWith(github.ref, '!refs/heads/documentation') && startsWith(github.ref, '!refs/heads/enhancement') && startsWith(github.ref, '!refs/heads/bug')
id: pr-template-other
uses: juliangruber/read-file-action@v1
with:
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
pr_assignee: "${{ github.actor }}"

- name: Create pull request - other (conditional)
if: startsWith(github.ref, '!refs/heads/documentation') && startsWith(github.ref, '!refs/heads/enhancement')
if: startsWith(github.ref, '!refs/heads/documentation') && startsWith(github.ref, '!refs/heads/enhancement') && startsWith(github.ref, '!refs/heads/bug')
uses: repo-sync/pull-request@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ check: ## Check TF and TG versions
find . -type f -name "*" -print0 | xargs -0 sed -i "s/$(TG_VERSION)/$(TG_LATEST)/g"; \
find . -type f -name "*" -print0 | xargs -0 sed -i "s/$(TF_VERSION)/$(TF_LATEST)/g"; \
else \
echo "::set-env name=VERSION_TAG::n/a"; \
echo -e "\n$(TXT_YELLOW) == NO CHANGES NEEDED ==$(TXT_RESET)"; \
fi

Expand Down

0 comments on commit 504c1fc

Please sign in to comment.