Skip to content

Merge pull request #210 from gocd/dependabot/gradle/org.junit-junit-b… #107

Merge pull request #210 from gocd/dependabot/gradle/org.junit-junit-b…

Merge pull request #210 from gocd/dependabot/gradle/org.junit-junit-b… #107

# 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