-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7a75faa
commit 944c676
Showing
4 changed files
with
64 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,16 @@ | ||
name: Build on every push | ||
name: Build on every push except main branch | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
- '*/*' | ||
- '**' | ||
- '!main' | ||
|
||
branches-ignore: | ||
- main | ||
|
||
jobs: | ||
build: | ||
name: "Build" | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Calculate release version | ||
run: | | ||
echo "release_version=1.$(date +'%g%m%d%H%M').$(echo ${{ github.ref_name }} | tr / -)" >> $GITHUB_ENV | ||
- name: Set version | ||
run: | | ||
sed -i "s/1.SNAPSHOT/${{ env.release_version }}/g" build.gradle.kts src/main/kotlin/id/walt/Values.kt | ||
- run: | | ||
git tag v${{ env.release_version }} | ||
git push --tags | ||
- name: Setup java | ||
uses: actions/[email protected] | ||
with: | ||
|
@@ -42,8 +29,5 @@ jobs: | |
uses: gradle/wrapper-validation-action@v1 | ||
- name: Running gradle build | ||
uses: eskatos/[email protected] | ||
env: | ||
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} | ||
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} | ||
with: | ||
arguments: build publish --no-daemon | ||
arguments: build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Deploy manually to test environment | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: "Deploy to test environment" | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup java | ||
uses: actions/[email protected] | ||
with: | ||
distribution: 'adopt-hotspot' | ||
java-version: '16' | ||
- name: Setup cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Gradle wrapper validation | ||
uses: gradle/wrapper-validation-action@v1 | ||
- name: Running gradle build | ||
uses: eskatos/[email protected] | ||
with: | ||
arguments: build | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
# - name: Build and push Docker images | ||
# uses: docker/[email protected] | ||
# with: | ||
# push: true | ||
# tags: waltid/xyzkit:latest, waltid/xyzkit:${{ github.ref }} | ||
- name: Prepare CD | ||
run: sed "s/_DEFAULT_DEPLOYMENT_/$GITHUB_SHA/g" k8s/deployment-dev.yaml > k8s/deployment_mod.yaml | ||
# - name: Continuous deployment | ||
# uses: actions-hub/kubectl@master | ||
# env: | ||
# KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }} | ||
# with: | ||
# args: apply -n portals -f k8s/deployment_mod.yaml |