summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorJakub Lidke2023-08-25 12:59:38 +0200
committerJakub Lidke2023-08-25 12:59:38 +0200
commitda26b5a2c88f68a36d20ead2e84f15672d5995f0 (patch)
treeb30b82fa7099bdb9cf4c261006548b58607d5f01 /.github/workflows
parentbbea48322fa5a24ff61eef25ed84f4966bf49c42 (diff)
parent9921e1e684cbc236ac645d5172a2385fa69e5bbc (diff)
Merge branch 'master' into add-docker-build
# Conflicts: # README.md # build.gradle.kts
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/deploy.yml35
-rw-r--r--.github/workflows/test.yml39
2 files changed, 74 insertions, 0 deletions
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
new file mode 100644
index 0000000..6d15376
--- /dev/null
+++ b/.github/workflows/deploy.yml
@@ -0,0 +1,35 @@
+name: "Run build and deploy"
+
+on:
+ release:
+ types: [ 'published' ]
+
+jobs:
+ docker:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - uses: actions/setup-java@v3
+ with:
+ java-version: '17'
+ distribution: 'temurin'
+
+ - name: Setup Gradle
+ uses: gradle/gradle-build-action@v2.4.2
+
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v2
+
+ - name: Login to Docker Hub
+ uses: docker/login-action@v2
+ with:
+ registry: ghcr.io
+ username: ${{ github.actor }}
+ password: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Execute image build and push
+ run: |
+ ./gradlew bootBuildImage
+ docker tag ghcr.io/ccc-mf/etl-processor ghcr.io/ccc-mf/etl-processor:${{ github.ref_name }}
+ docker push ghcr.io/ccc-mf/etl-processor
+ docker push ghcr.io/ccc-mf/etl-processor:${{ github.ref_name }} \ No newline at end of file
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 0000000..f7c37f3
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,39 @@
+name: 'Run Tests'
+
+on:
+ push:
+ branches: [ 'master' ]
+ tags: [ '*' ]
+ pull_request:
+ branches: [ '*' ]
+
+jobs:
+ tests:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - uses: actions/setup-java@v3
+ with:
+ java-version: '17'
+ distribution: 'temurin'
+
+ - name: Setup Gradle
+ uses: gradle/gradle-build-action@v2.4.2
+
+ - name: Execute tests
+ run: ./gradlew test
+
+ integrationTests:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - uses: actions/setup-java@v3
+ with:
+ java-version: '17'
+ distribution: 'temurin'
+
+ - name: Setup Gradle
+ uses: gradle/gradle-build-action@v2.4.2
+
+ - name: Execute integration tests
+ run: ./gradlew integrationTest \ No newline at end of file