fix CVEs #67
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PR Build | |
on: | |
pull_request | |
jobs: | |
pr-build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Java 17 for Gradle | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Gradle Cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle/caches | |
key: ${{runner.os}}-build-gradle-${{hashFiles('**/gradle-wrapper.properties')}} | |
- name: Docker Layer Cache | |
uses: satackey/action-docker-layer-caching@v0.0.11 | |
continue-on-error: true | |
with: | |
key: ${{ runner.os }}-docker-layer-cache | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: luofuxiang | |
password: ${{secrets.DOCKER_HUB_TOKEN}} | |
- name: Docker Version | |
run: | | |
docker --version | |
- name: Prepare parameters | |
run: | | |
git log --pretty=format:"%H - %an, %aI : %s" -5 | |
mkdir -p ~/.gradle | |
echo "GITHUB_TOKEN=${{secrets.PACKAGES_TOKEN}}" > ~/.gradle/gradle.properties | |
echo "GITHUB_USERNAME=Robothy" >> ~/.gradle/gradle.properties | |
chmod +x gradlew | |
pwd | |
ls -l | |
- name: Build | |
run: ./gradlew mergeReports | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
files: ./build/reports/jacoco/mergeReports/mergeReports.xml | |
token: ${{ secrets.CODECOV_GLOBAL_UPLOAD_TOKEN }} |