Skip to content

Commit

Permalink
add workflow for building all branches
Browse files Browse the repository at this point in the history
  • Loading branch information
ingomohr committed Jun 26, 2020
1 parent 8bdedc5 commit 4686d27
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 45 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/build-updatesite-branches.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This workflow builds the plugin, feature and update site and pushes the update
# site to a dedicated branch on the Githu repo.

name: Build Branch

on:
push:
branches:
- /refs/heads/*
- !master

jobs:
build:

runs-on: ubuntu-latest


steps:
- name: Fetch branch name
run:
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: fetch_branch
- uses: actions/checkout@v2
- name: Set up JDK 1.11
uses: actions/setup-java@v1
with:
java-version: 1.11
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Push Updatesite
uses: ingomohr/push-p2-repo-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
path-to-p2-repo-created-by-maven: 'releng-updatesite/target'
path-to-p2-repo-target: 'updatesite'
commit-message: 'add new updatesite'
target-branch-name: builds-${{ steps.fetch_branch.outputs.branch }}


34 changes: 34 additions & 0 deletions .github/workflows/build-updatesite-master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This workflow builds the plugin, feature and update site and pushes the update
# site to a dedicated branch called "updatesite" on the Githu repo.

name: Build Master

on:
push:
branches:
- master

jobs:
build:

runs-on: ubuntu-latest


steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.11
uses: actions/setup-java@v1
with:
java-version: 1.11
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Push Updatesite
uses: ingomohr/push-p2-repo-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
path-to-p2-repo-created-by-maven: 'releng-updatesite/target'
path-to-p2-repo-target: 'updatesite'
commit-message: 'add new updatesite'
target-branch-name: 'updatesite'


45 changes: 0 additions & 45 deletions .github/workflows/maven.yml

This file was deleted.

0 comments on commit 4686d27

Please sign in to comment.