Skip to content

Commit

Permalink
Merge pull request #1 from buildrun-tech/feature/updates-readme
Browse files Browse the repository at this point in the history
docs: update readme to test ci
  • Loading branch information
brunograna authored Feb 18, 2024
2 parents a81b80d + 047c248 commit 393e01a
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/ brunograna
73 changes: 73 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: CD

on:
push:
branches: [ "main" ]

jobs:
get-latest-release-number:
runs-on: ubuntu-latest
outputs:
latest_release_number: ${{ steps.get-latest-release.outputs.release_number }}
steps:
- name: Get latest release number
id: get-latest-release
run: echo "::set-output name=release_number::$(curl -s https://api.github.com/repos/${GITHUB_REPOSITORY}/releases/latest | jq -r '.tag_name' | cut -c 2- | awk -F. '{$NF = $NF + 1;} 1' | sed 's/ /./g')"

re-build:
needs: get-latest-release-number
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B package --file app/pom.xml

re-test:
needs: get-latest-release-number
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
cache: maven

- name: Test with Maven
run: mvn test --file app/pom.xml

create-binary:
needs: [re-test, re-build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up GraalVM Java 21
uses: actions/setup-java@v2
with:
java-version: '21'
distribution: 'graalvm'
cache: 'gradle'

- name: Compile to native image
run: ./mvnw -Pnative native:compile

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: |
./target
tag_name: ${{ needs.get-latest-release-number.outputs.latest_release_number }}
release_name: Release ${{ needs.get-latest-release-number.outputs.latest_release_number }}
body: |
Yeah! Version ${{ needs.get-latest-release-number.outputs.latest_release_number }} of BRC is now available!
token: ${{ secrets.GITHUB_TOKEN }}
18 changes: 15 additions & 3 deletions .github/workflows/release.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,19 @@ jobs:

- name: Build with Maven
run: mvn -B package --file app/pom.xml
test:

# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
- name: Update dependency graph
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
cache: maven

- name: Test with Maven
run: mvn test --file app/pom.xml
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ brc myconfig

### Support

[WORK IN PROGRESS]
[WORK IN PROGRESS]

0 comments on commit 393e01a

Please sign in to comment.