Skip to content

GHA fix checkout-ref & Gradle Wrapper #130

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

Merged
merged 3 commits into from
Jan 16, 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
20 changes: 11 additions & 9 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Common settings that generally should always be used with your language specific settings
# https://help.github.com/articles/dealing-with-line-endings/
# https://github.com/alexkaratarakis/gitattributes

# Auto detect text files and perform LF normalization
* text eol=lf
* text=auto

# The above will handle all files NOT found below

Expand Down Expand Up @@ -44,12 +44,14 @@
*.cmd text eol=crlf
*.ps1 text eol=crlf


# JVM sources
*.java text diff=java
*.gradle text diff=java
*.kt text diff=java
*.kts text diff=java
# JVM
*.java text diff=java
*.gradle text diff=java
*.java text diff=java
*.kt text diff=kotlin
*.kts text diff=kotlin
*.properties text
*.jar binary

# Text files where line endings should be preserved
*.patch -text
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_gradle_task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
- name: Checkout the repo
uses: actions/checkout@v3
with:
ref: ${{ inputs.checkout-ref || github.event.repository.default_branch }}
ref: ${{ inputs.checkout-ref || github.ref }}

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/run_publish_maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ permissions:
jobs:

sonatype-release:
if: github.ref == 'refs/heads/main'
permissions:
contents: read
packages: write
Expand All @@ -40,4 +41,4 @@ jobs:
runs-on: macos-latest # only macOS supports building all Kotlin targets
gradle-task: >-
publishAllPublicationsToSonatypeReleaseRepository --stacktrace --no-configuration-cache --no-parallel
checkout-ref: ${{ inputs.checkout-ref || github.event.repository.default_branch }}
checkout-ref: ${{ inputs.checkout-ref }}
2 changes: 1 addition & 1 deletion .github/workflows/run_publish_site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Checkout the repo
uses: actions/checkout@v3
with:
ref: ${{ inputs.checkout-ref || github.event.repository.default_branch }}
ref: ${{ inputs.checkout-ref || github.ref }}

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: Tests


on:
workflow_dispatch:
workflow_call:


concurrency:
group: "Tests: ${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/workflow_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
contents: write
packages: write
with:
checkout-ref: ${{ inputs.checkout-ref || github.event.repository.default_branch }}
checkout-ref: ${{ inputs.checkout-ref }}

publish-site:
needs: tests
Expand All @@ -51,4 +51,4 @@ jobs:
packages: write
pages: write # to deploy to Pages
with:
checkout-ref: ${{ inputs.checkout-ref || github.event.repository.default_branch }}
checkout-ref: ${{ inputs.checkout-ref }}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.