-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #273 from stumpapp/develop
Update main with latest develop
- Loading branch information
Showing
56 changed files
with
10,187 additions
and
4,781 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
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,128 @@ | ||
name: 'Release CI' | ||
|
||
# This workflow triggers when a PR is merged into `main`, but jobs have conditions to only run when: | ||
# - A PR is closed, merged into `main`, from a branch that matches the pattern `release/v*.*.*` | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
types: [opened, closed] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
DOCKER_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
jobs: | ||
parse-semver: | ||
if: contains(github.event.pull_request.head.ref, 'release/v') | ||
name: Parse semver version | ||
runs-on: [self-hosted] | ||
steps: | ||
- name: Extract version from branch name | ||
id: tag | ||
run: echo "version=$(echo ${{ github.event.pull_request.head.ref }} | sed -e 's/release\/v//')" >> $GITHUB_ENV | ||
|
||
- name: Print the tag | ||
run: echo "The output version is ${{ steps.tag.outputs.version }}" | ||
|
||
- name: Configure docker tags | ||
run: | | ||
echo "DOCKER_TAGS=latest,nightly,${{ steps.tag.outputs.version }}" >> $GITHUB_ENV | ||
echo "Docker tags are latest, nightly, and ${{ steps.tag.outputs.version }}" | ||
push-or-load: | ||
if: contains(github.event.pull_request.head.ref, 'release/v') | ||
name: Configure docker load/push | ||
runs-on: [self-hosted] | ||
steps: | ||
- name: Configure environment | ||
run: | | ||
echo "load=${{ github.event.pull_request.merged == false }}" >> $GITHUB_OUTPUT | ||
echo "push=${{ github.event.pull_request.merged == true }}" >> $GITHUB_OUTPUT | ||
build-stable-docker: | ||
if: contains(github.event.pull_request.head.ref, 'release/v') | ||
name: Build docker image | ||
runs-on: [self-hosted] | ||
needs: [parse-semver, push-or-load] | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Build and push docker image | ||
uses: ./.github/actions/build-docker | ||
with: | ||
username: ${{ env.DOCKER_USERNAME }} | ||
password: ${{ env.DOCKER_PASSWORD }} | ||
tags: ${{ env.DOCKER_TAGS }} | ||
load: ${{ steps.push-or-load.outputs.load }} | ||
push: ${{ steps.push-or-load.outputs.push }} | ||
platforms: 'linux/arm64/v8,linux/amd64' | ||
discord-webhook: ${{ secrets.DISCORD_WEBHOOK }} | ||
|
||
# build-web-app: | ||
# name: Build web app | ||
# runs-on: [self-hosted] | ||
# if: false # TODO: Enable this once 0.1.0 is ready | ||
# steps: | ||
# - name: Checkout repository | ||
# uses: actions/checkout@v3 | ||
|
||
# - name: Build the app | ||
# uses: ./.github/actions/build-web | ||
|
||
# - name: Upload the build | ||
# uses: ./.github/actions/upload-artifact | ||
# with: | ||
# upload-name: webapp | ||
# upload-path: apps/web/dist | ||
|
||
# build-server: | ||
# strategy: | ||
# fail-fast: true | ||
# matrix: | ||
# platform: [macos, windows] | ||
# name: Build server app | ||
# needs: build-web | ||
# runs-on: ${{ matrix.platform }} | ||
# if: false # TODO: Enable this once 0.1.0 is ready | ||
# steps: | ||
# - name: Checkout repository | ||
# uses: actions/checkout@v3 | ||
|
||
# - name: Build the server | ||
# uses: ./.github/actions/build-server | ||
# with: | ||
# platform: ${{ matrix.platform }} | ||
|
||
# - name: Upload the server binary | ||
# uses: ./.github/actions/upload-artifact | ||
# with: | ||
# upload-name: stump_server-${{ matrix.platform }} | ||
# upload-path: target/release/stump_server | ||
|
||
# # TODO: Investigate if I can just merge this with the above | ||
# build-linux-server: | ||
# name: Build server app (self-hosted runner) | ||
# needs: build-web | ||
# runs-on: [self-hosted] | ||
# if: false # TODO: Enable this once 0.1.0 is ready | ||
# steps: | ||
# - name: Checkout repository | ||
# uses: actions/checkout@v3 | ||
|
||
# - name: Build the server | ||
# uses: ./.github/actions/build-server | ||
# with: | ||
# platform: 'linux' | ||
|
||
# - name: Upload the server binary | ||
# uses: ./.github/actions/upload-artifact | ||
# with: | ||
# upload-name: stump_server-linux | ||
# upload-path: target/release/stump_server |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.