-
Notifications
You must be signed in to change notification settings - Fork 4
52 lines (48 loc) · 1.53 KB
/
test_and_build.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
43
44
45
46
47
48
49
50
51
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Test and Build
on:
push:
branches: [ master ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: addnab/docker-run-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
registry: docker.io
image: eclipse-temurin:17-ubi9-minimal
options: >-
-v ${{ github.workspace }}:/work
run: |
microdnf install -y git findutils yum-utils
cd work
./gradlew assemble check
previewGithubRelease:
needs: test
runs-on: ubuntu-latest
env:
GITHUB_USER: "gocd"
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: addnab/docker-run-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
registry: docker.io
image: eclipse-temurin:17-ubi9-minimal
options: >-
-v ${{ github.workspace }}:/work
-e GITHUB_USER=gocd
-e GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
run: |
microdnf install -y git findutils
git config --global --add safe.directory /work
cd work
./gradlew githubRelease