Push none master branch actions.
This commit is contained in:
parent
e6f08bedca
commit
f87174c9fc
|
@ -1,4 +1,4 @@
|
||||||
name: "Build and test Maven GitHub action"
|
name: "Build and test release Maven GitHub action"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
@ -46,32 +46,3 @@ jobs:
|
||||||
|
|
||||||
- name: "Validate Maven version"
|
- name: "Validate Maven version"
|
||||||
run: mvn -v | head -1 | grep "${{ matrix.maven_version }}"
|
run: mvn -v | head -1 | grep "${{ matrix.maven_version }}"
|
||||||
|
|
||||||
build_and_commit:
|
|
||||||
name: "Set up Maven and validate"
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: "Checkout code"
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: "Set Node.js"
|
|
||||||
uses: actions/setup-node@v1
|
|
||||||
with:
|
|
||||||
node-version: 12
|
|
||||||
|
|
||||||
- name: "Install"
|
|
||||||
run: npm install
|
|
||||||
|
|
||||||
- name: "Commit files"
|
|
||||||
run: |
|
|
||||||
git config --local user.email "$(git log --format='%ae' HEAD^!)"
|
|
||||||
git config --local user.name "$(git log --format='%an' HEAD^!)"
|
|
||||||
git remote add github "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git"
|
|
||||||
git pull github ${{ github.head_ref }} --ff-only
|
|
||||||
git add .
|
|
||||||
if [ -z "$(git status --porcelain)" ]; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
git commit -m "Fix a[href] in Webflow exported html"
|
|
||||||
git push github HEAD:${{ github.head_ref }}
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
name: "Build and test release Maven GitHub action"
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- !master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build_and_test:
|
||||||
|
name: "Set up Maven and validate it"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: "Checkout code"
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: "Set Node.js"
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 12
|
||||||
|
|
||||||
|
- name: "Install"
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- name: "Run build"
|
||||||
|
run: npm run build
|
||||||
|
|
||||||
|
- name: "Install ncc"
|
||||||
|
run: npm i -g @vercel/ncc
|
||||||
|
|
||||||
|
- name: "Run distribution"
|
||||||
|
run: npm run build-dist
|
||||||
|
|
||||||
|
- name: "Set up JDK"
|
||||||
|
uses: actions/setup-java@v2
|
||||||
|
with:
|
||||||
|
java-version: "8"
|
||||||
|
distribution: "adopt"
|
||||||
|
|
||||||
|
- name: "Set Maven from local GitHub action"
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
maven-version: 3.8.1
|
||||||
|
|
||||||
|
- name: "Validate Maven version"
|
||||||
|
run: mvn -v | head -1 | grep "3.8.1"
|
||||||
|
|
||||||
|
- uses: stefanzweifel/git-auto-commit-action@v4
|
||||||
|
with:
|
||||||
|
commit_message: "Apply local changes"
|
|
@ -1,4 +1,4 @@
|
||||||
name: "Test Maven GitHub action"
|
name: "Test master branch Maven GitHub action"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
Loading…
Reference in New Issue