Skip to content

Commit

Permalink
Fix GH Actions in act
Browse files Browse the repository at this point in the history
act is a tool that let's users test GitHub Actions on a local machine,
but it doesn't support caching at the moment.
nektos/act#285 (comment)
  • Loading branch information
Smart123s committed Mar 13, 2022
1 parent a856356 commit 6b9f291
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
distribution: 'adopt'
# Use Java 16, because it's minimum required version by Geyser
java-version: 16
cache: 'maven'
cache: ${{ !env.ACT && 'maven' || '' }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand All @@ -52,6 +52,7 @@ jobs:

# Cache build process too like in the maven config
- uses: actions/cache@v2.1.4
if: ${{ !env.ACT }}
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
distribution: 'temurin'
# Use Java 16, because it's minimum required version by Geyser
java-version: 16
cache: 'maven'
cache: ${{ !env.ACT && 'maven' || '' }}

# Build and test (included in package)
- name: Build with Maven and test
Expand Down

0 comments on commit 6b9f291

Please sign in to comment.