Skip to content

Commit 1a6bde8

Browse files
authored
Merge pull request #284 from chewiebug/feature/update-pull-request-workflow
add local Github Actions execution support
2 parents 3c2b290 + db6ea7b commit 1a6bde8

File tree

3 files changed

+26
-5
lines changed

3 files changed

+26
-5
lines changed

.github/workflows/pullrequest.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ jobs:
1818
runs-on: ubuntu-latest
1919
strategy:
2020
matrix:
21-
java: [ '8' , '11', '17' , '21']
22-
name: build with Java ${{ matrix.Java }}
21+
java: [ '8', '17', '21', '25']
22+
name: build with Java ${{ matrix.java }}
2323
steps:
24-
- uses: actions/checkout@v4
24+
- uses: actions/checkout@v6
2525
- name: Set up Java
26-
uses: actions/setup-java@v4
26+
uses: actions/setup-java@v5
2727
with:
28-
java-version: ${{ matrix.Java }}
28+
java-version: ${{ matrix.java }}
2929
distribution: 'temurin'
3030
cache: maven
3131
- name: run headless maven build
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pushd ..
2+
act --workflows .\.github\workflows\pullrequest.yaml pull_request -P ubuntu-latest=-self-hosted
3+
popd

act/readme.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# using act on Windows to run GitHub Actions locally
2+
## introduction
3+
Some notes on how to use [act](https://nektosact.com/) on Windows to run GitHub Actions workflows locally for
4+
quick testing without pushing changes to GitHub.
5+
6+
The current setup uses the "self-hosted" runner type, which requires all necessary tools to be installed on the host
7+
system (see preconditions).
8+
9+
## preconditions
10+
the following tools must be installed and available in the system PATH:
11+
- act.exe (https://nektosact.com/installation/index.html)
12+
- node.exe (https://nodejs.org/en/download/)
13+
- apache-maven-3.x (mvn command) (https://maven.apache.org/download.cgi)
14+
- git.exe (https://git-scm.com/install/windows)
15+
16+
## execution
17+
- open a command prompt (cmd.exe) or PowerShell
18+
- execute one of the batch files inside this directory (assumption: current directory is <root>/act/)

0 commit comments

Comments
 (0)