Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade CI/CD #212

Merged
merged 2 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Basic set up for gradle package manager
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "gradle"
directory: "/"
schedule:
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/cd-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,31 @@ jobs:
with:
fetch-depth: 0
- name: "Setup Java JDK"
uses: actions/setup-java@v1.4.3
uses: actions/setup-java@v4.2.1
with:
java-version: 11
java-version: 21
distribution: adopt
- name: "Setup gradle"
uses: gradle/actions/setup-gradle@v3.3.2
- name: Build base image
run: |
docker build -t ghcr.io/raynigon/raylevation-gdal-base:3.4.3 .
docker build -t ghcr.io/raynigon/raylevation-gdal-base:3.8.5 .
- id: vars
name: "Determine Tag Name"
run: |
VERSION_LINE=$(cat gradle.properties | grep "version=")
CURRENT_VERSION=${VERSION_LINE//version=/}
TAG_VERSION=v${CURRENT_VERSION//-SNAPSHOT/}
echo ::set-output name=version::${CURRENT_VERSION//-SNAPSHOT/}
echo ::set-output name=tag::$TAG_VERSION
echo "version=${CURRENT_VERSION//-SNAPSHOT/}" >> $GITHUB_OUTPUT
echo "tag=$TAG_VERSION" >> $GITHUB_OUTPUT
- name: "Prepare Git"
run: |
git config --global user.email "84719472+raynigon-bot@users.noreply.github.com"
git config --global user.name "raynigon[bot]"
git checkout -b release
- name: "Publish Artifacts"
uses: eskatos/gradle-command-action@cd3cedc781988c804f626f4cd2dc51d0bdf02a12 #v2.2.1
with:
arguments: ":release -Prelease.useAutomaticVersion=true -x check"
wrapper-cache-enabled: true
dependencies-cache-enabled: true
run: "./gradlew :release -Prelease.useAutomaticVersion=true -x check"
env:
GITHUB_USERNAME: raynigon
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
28 changes: 11 additions & 17 deletions .github/workflows/ci-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,14 @@ jobs:
with:
java-version: 17
distribution: adopt
- name: "Setup gradle"
uses: gradle/actions/setup-gradle@v3.3.2
- name: Kotlin Linter
uses: eskatos/gradle-command-action@v1.3.2
with:
arguments: ktlintCheck
run: "./gradlew ktlintCheck"
- name: Checkstyle Linter
uses: eskatos/gradle-command-action@v1.3.2
with:
arguments: checkstyleMain
run: "./gradlew checkstyleMain"
- name: PMD Linter
uses: eskatos/gradle-command-action@v1.3.2
with:
arguments: pmdMain
run: "./gradlew pmdMain"
- uses: jwgmeligmeyling/checkstyle-github-action@master
with:
path: '**/checkstyle/main.xml'
Expand All @@ -64,18 +60,16 @@ jobs:
with:
java-version: 17
distribution: adopt
- name: "Setup gradle"
uses: gradle/actions/setup-gradle@v3.3.2
- name: Login to DockerHub
uses: docker/login-action@v1
with:
registry: "ghcr.io"
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Gradle Command - jibDockerBuild
uses: eskatos/gradle-command-action@v1.3.3
with:
arguments: jibDockerBuild -x check
wrapper-cache-enabled: true
dependencies-cache-enabled: true
run: "./gradlew jibDockerBuild -x check"
- name: Test Docker Image
run: ".github/scripts/test-docker-image.sh"
timeout-minutes: 2
Expand All @@ -89,10 +83,10 @@ jobs:
with:
java-version: 17
distribution: adopt
- name: "Setup gradle"
uses: gradle/actions/setup-gradle@v3.3.2
- name: Generate javadoc
uses: eskatos/gradle-command-action@v1.3.2
with:
arguments: dokkaHtml
run: "./gradlew dokkaHtml"
- name: Upload Dokka
uses: sebastianpopp/ftp-action@releases/v2
if: github.ref == 'refs/heads/main' || contains(github.ref, 'refs/tags/')
Expand Down
Loading