Skip to content

Commit

Permalink
Don't run the CI build twice for a tag.
Browse files Browse the repository at this point in the history
Signed-off-by: Sjoerd Talsma <sjoerd@talsma-ict.nl>
  • Loading branch information
sjoerdtalsma committed Mar 12, 2021
1 parent 07cf3fe commit acca42b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
5 changes: 0 additions & 5 deletions .github/mvn-settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>github.com</id>
<username>${env.GH_USER}</username>
<password>${env.GH_TOKEN}</password>
</server>
<server>
<id>ossrh</id>
<username>${env.SONATYPE_USER}</username>
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
name: CI build

# Run this workflow every time a new commit pushed to your repository
on: push
on:
push:
branches:
- '**'
tags-ignore:
- '**'

jobs:
build:
Expand Down Expand Up @@ -55,7 +60,10 @@ jobs:
with:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN }}
# persist-credentials: false
- name: Set up CI git user
run: |
git config user.name "Talsma CI"
git config user.email "ci-user@talsma-ict.nl"
- name: Set up JDK
uses: actions/setup-java@v1
with:
Expand All @@ -66,16 +74,8 @@ jobs:
path: ~/.m2/repository
key: ${{ runner.os }}-m2-repo-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2-repo-
- name: Set up CI git user
run: |
git config user.name "Talsma CI"
git config user.email "ci-user@talsma-ict.nl"
# git config credential.helper "store --file=.git/credentials"
# cat <(echo -e "https://${{ secrets.GH_TOKEN }}:@github.com") > .git/credentials
- name: Perform optional release
run: .github/scripts/release.sh
shell: bash
env:
MAVEN_CLI_OPTS: --settings .github/mvn-settings.xml
GH_USER: ${{ secrets.GH_USER }}
# GH_TOKEN: ${{ secrets.GH_TOKEN }}

0 comments on commit acca42b

Please sign in to comment.