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

[test] add actions #1

Closed
wants to merge 71 commits into from
Closed
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
cb5dc62
first action
ramonpetgrave64 Jan 31, 2024
2ceafd8
correct workflows location
ramonpetgrave64 Jan 31, 2024
ac57018
remove old copy
ramonpetgrave64 Jan 31, 2024
955019e
add gradle-build workflow
ramonpetgrave64 Jan 31, 2024
7f386de
also act on push
ramonpetgrave64 Jan 31, 2024
66a99b2
on as list
ramonpetgrave64 Jan 31, 2024
90d6a8f
fix format
ramonpetgrave64 Jan 31, 2024
cdff1c9
only ubuntu-latest
ramonpetgrave64 Jan 31, 2024
3ee87cc
PRs onyl
ramonpetgrave64 Jan 31, 2024
b54a6ca
rename artifact to app
ramonpetgrave64 Jan 31, 2024
e5e7017
add slsa builder
ramonpetgrave64 Jan 31, 2024
88d4dbc
also run sls builder on PRs
ramonpetgrave64 Jan 31, 2024
1e2bb56
fix format
ramonpetgrave64 Jan 31, 2024
76fd577
on push, not pull_request
ramonpetgrave64 Jan 31, 2024
ac7e342
use relative path for artifact
ramonpetgrave64 Jan 31, 2024
a38d803
artifact path relative to project dir
ramonpetgrave64 Feb 1, 2024
7357892
dont use ./
ramonpetgrave64 Feb 1, 2024
0887767
tmate
ramonpetgrave64 Feb 1, 2024
21c0e81
always run
ramonpetgrave64 Feb 1, 2024
d7558e0
use my fork of slsa-github-generator
ramonpetgrave64 Feb 1, 2024
0ec6d62
use ./app/build/libs/app.jar
ramonpetgrave64 Feb 1, 2024
83c5b1a
cleanup
ramonpetgrave64 Feb 1, 2024
14669a0
Revert "cleanup"
ramonpetgrave64 Feb 1, 2024
024875b
cleanup
ramonpetgrave64 Feb 1, 2024
a1262cf
use rekor
ramonpetgrave64 Feb 1, 2024
c1b39cc
double artifact
ramonpetgrave64 Feb 1, 2024
cd65327
multiple artifacts
ramonpetgrave64 Feb 2, 2024
4c68e8b
one line
ramonpetgrave64 Feb 2, 2024
5293e95
use non-test artifact
ramonpetgrave64 Feb 2, 2024
f1e12e1
yaml multiline string
ramonpetgrave64 Feb 2, 2024
cc8b40f
edit
ramonpetgrave64 Feb 9, 2024
beb1f6a
alternate build script
ramonpetgrave64 Feb 9, 2024
7f7bbcb
back to main
ramonpetgrave64 Feb 9, 2024
af3b52a
use my alternate gradel fix
ramonpetgrave64 Feb 9, 2024
8c07c09
attempt to get oidc
ramonpetgrave64 Feb 13, 2024
b0ea8fd
attempt 2
ramonpetgrave64 Feb 13, 2024
d8f2dad
typo
ramonpetgrave64 Feb 13, 2024
bdb71df
add permissions
ramonpetgrave64 Feb 13, 2024
8a949d9
no azure
ramonpetgrave64 Feb 13, 2024
f19b0bd
no au
ramonpetgrave64 Feb 13, 2024
841621c
gh cli
ramonpetgrave64 Feb 13, 2024
cf103ee
env
ramonpetgrave64 Feb 13, 2024
fe59af8
perms
ramonpetgrave64 Feb 13, 2024
48e0081
job id contect
ramonpetgrave64 Feb 13, 2024
d3b7625
repo name
ramonpetgrave64 Feb 13, 2024
1a7d4ed
more contexts
ramonpetgrave64 Feb 13, 2024
1a65c75
try to get list of jobs for run
ramonpetgrave64 Feb 13, 2024
97bdbe5
another job
ramonpetgrave64 Feb 13, 2024
70efb95
name spoof
ramonpetgrave64 Feb 13, 2024
87f55ae
self-hosted runner check
ramonpetgrave64 Feb 13, 2024
ea432b9
sanity check
ramonpetgrave64 Feb 13, 2024
5c3e54f
typos?
ramonpetgrave64 Feb 13, 2024
ee2c2ed
debug
ramonpetgrave64 Feb 13, 2024
27d039f
debug
ramonpetgrave64 Feb 13, 2024
d7536bb
debug
ramonpetgrave64 Feb 13, 2024
7365b58
flattten
ramonpetgrave64 Feb 13, 2024
a643ea3
echo the labels
ramonpetgrave64 Feb 14, 2024
5d05584
more echi
ramonpetgrave64 Feb 14, 2024
51c104b
assert_true
ramonpetgrave64 Feb 14, 2024
877cee2
source properly
ramonpetgrave64 Feb 14, 2024
030d492
correct path
ramonpetgrave64 Feb 14, 2024
fe81dd9
ls -lahR
ramonpetgrave64 Feb 14, 2024
a843ba2
ls
ramonpetgrave64 Feb 14, 2024
19cbdaa
embed scripts
ramonpetgrave64 Feb 14, 2024
44e762e
assert
ramonpetgrave64 Feb 14, 2024
8d88359
no quote
ramonpetgrave64 Feb 14, 2024
e645855
jq -r
ramonpetgrave64 Feb 14, 2024
52f4721
no comma
ramonpetgrave64 Feb 14, 2024
618e569
use my runner
ramonpetgrave64 Feb 21, 2024
7f85aa4
runs on in jab
ramonpetgrave64 Feb 21, 2024
b194463
go
ramonpetgrave64 Feb 21, 2024
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
19 changes: 19 additions & 0 deletions .github/workflows/github-actions-demo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: GitHub Actions Demo
run-name: ${{ github.actor }} is testing out GitHub Actions 🚀
on: [push]
jobs:
Explore-GitHub-Actions:
runs-on: ubuntu-latest
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Check out repository code
uses: actions/checkout@v4
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
- name: List files in the repository
run: |
ls ${{ github.workspace }}
- run: echo "🍏 This job's status is ${{ job.status }}."

26 changes: 26 additions & 0 deletions .github/workflows/gradle-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Run Gradle on PRs
on: [pull_request]
jobs:
gradle:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11

- name: Setup Gradle
uses: gradle/gradle-build-action@v3

- name: Execute Gradle build
run: ./gradlew build

- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: app
path: ${{ github.workspace }}/app/build/libs/app.jar
17 changes: 17 additions & 0 deletions .github/workflows/slsa-gradle-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: SLSA Provenance with Gradle builder
on: [workflow_dispatch, push]

permissions: read-all

jobs:
build:
permissions:
id-token: write
contents: read
actions: read
# uses: slsa-framework/slsa-github-generator/.github/workflows/builder_gradle_slsa3.yml@v1.9.0
uses: ramonpetgrave64/slsa-github-generator/.github/workflows/builder_gradle_slsa3.yml@ramonpetgrave64-gradle-fix
with:
artifact-list: >-
./build/app/libs/app.jar,
./build/app/classes/java/main/my/example/gradle/project/App.class,
9 changes: 9 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,12 @@ tasks.named<Test>("test") {
// Use JUnit Platform for unit tests.
useJUnitPlatform()
}

tasks.register<Copy>("copySubProjectBuild") {
from(layout.buildDirectory)
into("${rootProject.projectDir}/build/${project.name}")
}

tasks.named("build") {
finalizedBy("copySubProjectBuild")
}
Loading