Skip to content

Commit

Permalink
chore: add dependabot, client repository
Browse files Browse the repository at this point in the history
  • Loading branch information
astappiev committed Sep 21, 2023
1 parent 90cc28e commit af4556d
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 9 deletions.
21 changes: 21 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "maven"
directory: "/"
schedule:
interval: "weekly"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "weekly"
34 changes: 34 additions & 0 deletions .github/workflows/publish-client.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path

name: publish-client

on:
workflow_dispatch:
push:
branches: [ main ]

permissions:
contents: read
packages: write

jobs:
deploy-client:
if: github.event.head_commit.message == 'chore(client):: version release'
runs-on: ubuntu-latest
env:
MVN: mvn --show-version --batch-mode
steps:
- uses: actions/checkout@v4

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

- name: Publish to GitHub Packages Apache Maven
run: $MVN -pl interweb-client deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12 changes: 3 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,13 @@ jobs:
env:
MVN: mvn --show-version --batch-mode
steps:
- uses: actions/checkout@v4

- uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- uses: actions/checkout@v4

- name: cache ~/.m2
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
cache: 'maven'

- name: run compile
run: $MVN clean compile
Expand Down
8 changes: 8 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@
<module>connectors/YouTubeConnector</module>
</modules>

<distributionManagement>
<repository>
<id>github</id>
<name>Learnweb GitHub Packages</name>
<url>https://maven.pkg.github.com/l3s-learnweb/learnweb</url>
</repository>
</distributionManagement>

<dependencyManagement>
<dependencies>
<dependency>
Expand Down

0 comments on commit af4556d

Please sign in to comment.