diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-05-06 16:16:10 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-06 16:16:10 +0200 |
| commit | 375f329d6b276f802aafc14ce90520e807398d6e (patch) | |
| tree | 69f1a0edf7223e42e143e2d1d094c6eaaad0c400 /.github/workflows | |
| parent | e1d892bcbaa7e8361c150f684ca6a0dc5e036a87 (diff) | |
| parent | d4eb8ccd4f5d93d9e858b9c3ed6ff48763e68820 (diff) | |
chore: Prepare for OpenDC 2.0 release (v2)
This pull request performs several preparations for the official release of OpenDC 2.0.
With this pull request, we focus on the deployment of OpenDC to DockerHub and Maven Central.
* Add workflow for creating releases on Github and publishing to Maven Central
* Add workflow for publishing images on DockerHub
* Add support for runtime variables in frontend Docker image
* Add support for building Dokka documentation
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/publish.yml | 48 | ||||
| -rw-r--r-- | .github/workflows/release.yml | 47 |
2 files changed, 95 insertions, 0 deletions
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..4c74bb36 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,48 @@ +name: Publish Docker image + +on: + release: + types: [published] + +jobs: + push-simulator: + name: Push Simulator + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v2 + - name: Push to Docker Hub + uses: docker/build-push-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + repository: atlargeresearch/opendc + tag_with_ref: true + push-api: + name: Push API + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v2 + - name: Push to Docker Hub + uses: docker/build-push-action@v1 + with: + context: opendc-web/opendc-web-api + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + repository: atlargeresearch/opendc-web-api + tag_with_ref: true + push-ui: + name: Push UI + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v2 + - name: Push to Docker Hub + uses: docker/build-push-action@v1 + with: + context: opendc-web/opendc-web-ui + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + repository: atlargeresearch/opendc-web-ui + tag_with_ref: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..d9cd6c97 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,47 @@ +name: Release + +on: + push: + tags: ['v*'] + +jobs: + build: + name: Build OpenDC + runs-on: ubuntu-latest + strategy: + matrix: + java: [ 15 ] + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Validate Gradle wrapper + uses: gradle/wrapper-validation-action@v1 + - name: Set up JDK + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - uses: actions/cache@v1 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-${{ matrix.java }}-gradle-${{ hashFiles('**/*.gradle*') }} + restore-keys: | + ${{ runner.os }}-${{ matrix.java }}-gradle- + - name: Build with Gradle + run: ./gradlew :assembleDist + - name: Publish with Gradle + run: ./gradlew publish + env: + ORG_GRADLE_PROJECT_signingKeyId: F8134F9C + ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }} + ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.PASSPHRASE }} + ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.OSSRH_USERNAME }} + ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.OSSRH_PASSWORD }} + - name: Create Release + uses: softprops/action-gh-release@v1 + with: + prerelease: ${{ contains(github.ref, '-rc') || contains(github.ref, '-m') }} + files: build/distributions/* + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
