-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (40 loc) · 1.45 KB
/
branch.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Build non-master/main branches on push.
# If you want to deploy your branch see branch-deploy.yml
on:
push:
branches:
- '*' # matches every branch that doesn't contain a '/'
- '*/*' # matches every branch containing a single '/'
- '**' # matches every branch
- '!master' # excludes master
- '!main' # excludes main (will probably replace master)
paths-ignore:
- '.github/workflows/datapakker.yml'
- '.github/workflows/codeql.yml'
- '.github/workflows/alerts-deploy.yml'
- 'datapakker/**'
env:
IMAGE: ghcr.io/${{ github.repository }}/su-se-bakover:${{ github.sha }}
jobs:
build:
name: Run Gradle test and build steps
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('gradle.properties', 'settings.gradle.kts', '**/build.gradle.kts', 'gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- uses: actions/setup-java@v3
with:
java-version: '19'
distribution: 'temurin'
- name: test and build
run: ./gradlew --no-build-cache test build
env:
ORG_GRADLE_PROJECT_githubUser: x-access-token
ORG_GRADLE_PROJECT_githubPassword: ${{ secrets.GITHUB_TOKEN }}