Moving server files to ./server
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
name: Build
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 2022.9.x
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: sonarsource/sonarqube-scan-action@master
|
||||
env:
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_202209 }}
|
||||
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
|
||||
# If you wish to fail your job when the Quality Gate is red, uncomment the
|
||||
# following lines. This would typically be used to fail a deployment.
|
||||
# - uses: sonarsource/sonarqube-quality-gate-action@2022.9.x
|
||||
# timeout-minutes: 5
|
||||
# env:
|
||||
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_202209 }}
|
||||
@@ -1,28 +0,0 @@
|
||||
name: checks
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
|
||||
jobs:
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.18
|
||||
- uses: actions/cache@v2
|
||||
if: ${{ !env.ACT }}
|
||||
with:
|
||||
path: ~/go/pkg/mod
|
||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: ${{ runner.os }}-go-
|
||||
- run: make test.coverprofile.all
|
||||
env:
|
||||
GOFLAGS: -mod=readonly
|
||||
- uses: codecov/codecov-action@v1
|
||||
with:
|
||||
token: 628a7104-4ec8-46ef-a3a8-50b0c2507082
|
||||
files: .cover.out
|
||||
fail_ci_if_error: true
|
||||
@@ -1,92 +0,0 @@
|
||||
name: notify
|
||||
|
||||
on:
|
||||
issues:
|
||||
issue_comment:
|
||||
release:
|
||||
pull_request_review_comment:
|
||||
types: [ created ]
|
||||
pull_request:
|
||||
types: [ opened, reopened, closed ]
|
||||
|
||||
jobs:
|
||||
send-message:
|
||||
runs-on: ubuntu-latest
|
||||
name: Send message via Matrix on issue
|
||||
steps:
|
||||
|
||||
- name: Dump GitHub context
|
||||
env:
|
||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||
run: |
|
||||
echo "$GITHUB_CONTEXT"
|
||||
|
||||
# only if not a comment
|
||||
- name: Send message on issue
|
||||
if: ${{ !github.event.comment && github.event.issue }}
|
||||
id: matrix-chat-issue
|
||||
uses: fadenb/matrix-chat-message@v0.0.6
|
||||
with:
|
||||
homeserver: ${{ secrets.MATRIX_HOME_SERVER }}
|
||||
token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
|
||||
channel: ${{ secrets.MATRIX_ROOM_ID }}
|
||||
message: |
|
||||
### [ ${{ github.event.repository.name }} ]
|
||||
An issue has been **${{ github.event.action }}** by ${{ github.triggering_actor }}\
|
||||
More info [here](${{ github.event.issue.html_url }})
|
||||
|
||||
# only for comments
|
||||
- name: Send message on issue comment
|
||||
if: github.event_name == 'issue_comment'
|
||||
id: matrix-chat-issue-comment
|
||||
uses: fadenb/matrix-chat-message@v0.0.6
|
||||
with:
|
||||
homeserver: ${{ secrets.MATRIX_HOME_SERVER }}
|
||||
token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
|
||||
channel: ${{ secrets.MATRIX_ROOM_ID }}
|
||||
message: |
|
||||
### [ ${{ github.event.repository.name }} ]
|
||||
An issue comment has been **${{ github.event.action }}** by ${{ github.triggering_actor }}\
|
||||
More info [here](${{ github.event.issue.html_url }})
|
||||
|
||||
# only for releases
|
||||
- name: Send message on release
|
||||
if: github.event_name == 'release'
|
||||
id: matrix-chat-release
|
||||
uses: fadenb/matrix-chat-message@v0.0.6
|
||||
with:
|
||||
homeserver: ${{ secrets.MATRIX_HOME_SERVER }}
|
||||
token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
|
||||
channel: ${{ secrets.MATRIX_ROOM_ID }}
|
||||
message: |
|
||||
### [ ${{ github.event.repository.name }} ]
|
||||
A release **${{ github.event.release.tag_name }}** has been **${{ github.event.action }}** by ${{ github.event.release.author.login }}\
|
||||
More info [here](${{ github.event.release.html_url }})
|
||||
|
||||
# only for PR comments
|
||||
- name: Send message on PR comment
|
||||
if: github.event_name == 'pull_request_review_comment'
|
||||
id: matrix-chat-pr-commented
|
||||
uses: fadenb/matrix-chat-message@v0.0.6
|
||||
with:
|
||||
homeserver: ${{ secrets.MATRIX_HOME_SERVER }}
|
||||
token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
|
||||
channel: ${{ secrets.MATRIX_ROOM_ID }}
|
||||
message: |
|
||||
### [ ${{ github.event.repository.name }} ]
|
||||
A Pull Request has been **commented on** by ${{ github.event.sender.login }}\
|
||||
More info [here](${{ github.event.pull_request._links.html.href }})
|
||||
|
||||
# only for PR actions
|
||||
- name: Send message on PR action
|
||||
if: github.event_name == 'pull_request'
|
||||
id: matrix-chat-pr
|
||||
uses: fadenb/matrix-chat-message@v0.0.6
|
||||
with:
|
||||
homeserver: ${{ secrets.MATRIX_HOME_SERVER }}
|
||||
token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
|
||||
channel: ${{ secrets.MATRIX_ROOM_ID }}
|
||||
message: |
|
||||
### [ ${{ github.event.repository.name }} ]
|
||||
A Pull Request has been **${{ github.event.action }}** by ${{ github.event.sender.login }}\
|
||||
More info [here](${{ github.event.pull_request._links.html.href }})
|
||||
@@ -1,126 +0,0 @@
|
||||
name: release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '**'
|
||||
|
||||
|
||||
jobs:
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
GOFLAGS: -mod=readonly
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.18
|
||||
- uses: actions/cache@v2
|
||||
if: ${{ !env.ACT }}
|
||||
with:
|
||||
path: ~/go/pkg/mod
|
||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: ${{ runner.os }}-go-
|
||||
- run: make test.all
|
||||
|
||||
# Building web console for server and cache it for release-* steps
|
||||
# we'll do this in parallel with tests to gain a few seconds
|
||||
build-web-console:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '16'
|
||||
- uses: actions/cache@v2
|
||||
if: ${{ !env.ACT }}
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.OS }}-node-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: ${{ runner.OS }}-node-
|
||||
- name: Install dependencies
|
||||
working-directory: ./webconsole
|
||||
run: yarn install
|
||||
- name: Build Package
|
||||
working-directory: ./webconsole
|
||||
run: yarn build
|
||||
|
||||
- name: Cache console build
|
||||
uses: actions/cache@v2
|
||||
with: { path: ./webconsole/dist, key: console-build }
|
||||
|
||||
release-linux:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ build-web-console, test ]
|
||||
env:
|
||||
BUILD_OS: linux
|
||||
BUILD_ARCH: amd64
|
||||
RELEASE_SFTP_KEY: ${{ secrets.RELEASE_SFTP_KEY }}
|
||||
RELEASE_SFTP_URI: ${{ secrets.RELEASE_SFTP_URI }}
|
||||
steps:
|
||||
- run: echo "BUILD_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.18
|
||||
|
||||
- name: Restore console build from cache
|
||||
uses: actions/cache@v2
|
||||
with: { path: ./webconsole/dist, key: console-build }
|
||||
|
||||
- run: make release-clean release
|
||||
- run: make upload
|
||||
if: ${{ !env.ACT }}
|
||||
|
||||
release-darwin:
|
||||
runs-on: macos-latest
|
||||
needs: [ build-web-console, test ]
|
||||
env:
|
||||
BUILD_OS: darwin
|
||||
BUILD_ARCH: amd64
|
||||
BUILD_VERSION: ${{ format(github.ref, 'refs/tags/', '') }}
|
||||
RELEASE_SFTP_KEY: ${{ secrets.RELEASE_SFTP_KEY }}
|
||||
RELEASE_SFTP_URI: ${{ secrets.RELEASE_SFTP_URI }}
|
||||
steps:
|
||||
- run: echo "BUILD_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.18
|
||||
- uses: actions/cache@v2
|
||||
if: ${{ !env.ACT }}
|
||||
with:
|
||||
path: ~/go/pkg/mod
|
||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: ${{ runner.os }}-go-
|
||||
|
||||
- name: Restore console build from cache
|
||||
uses: actions/cache@v2
|
||||
with: { path: ./webconsole, key: console-build }
|
||||
|
||||
- run: make release-clean release
|
||||
- run: make upload
|
||||
if: ${{ !env.ACT }}
|
||||
|
||||
release-docker:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ release-linux ]
|
||||
env:
|
||||
BUILD_OS: linux
|
||||
BUILD_ARCH: amd64
|
||||
steps:
|
||||
- run: echo "BUILD_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|
||||
- uses: actions/checkout@v2
|
||||
- uses: docker/login-action@v1
|
||||
if: ${{ !env.ACT }}
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- run: |
|
||||
docker build --build-arg "VERSION=${{ env.BUILD_VERSION }}" \
|
||||
-t cortezaproject/corteza-server:${{ env.BUILD_VERSION }} .
|
||||
if: ${{ !env.ACT }}
|
||||
- run: docker push cortezaproject/corteza-server:${{ env.BUILD_VERSION }}
|
||||
if: ${{ !env.ACT }}
|
||||
@@ -1,64 +0,0 @@
|
||||
name: snapshot
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 2021.3.x*
|
||||
- 2021.6.x*
|
||||
- 2021.9.x*
|
||||
- 2021.12.x*
|
||||
- 2022.3.x*
|
||||
- 2022.9.x*
|
||||
|
||||
jobs:
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
GOFLAGS: -mod=readonly
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.18
|
||||
- uses: actions/cache@v2
|
||||
if: ${{ !env.ACT }}
|
||||
with:
|
||||
path: ~/go/pkg/mod
|
||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: ${{ runner.os }}-go-
|
||||
- run: make test.all
|
||||
|
||||
snapshot-docker:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- test
|
||||
env:
|
||||
BUILD_OS: linux
|
||||
BUILD_ARCH: amd64
|
||||
BUILD_VERSION_SHA: ${GITHUB_SHA}
|
||||
steps:
|
||||
- run: echo "BUILD_VERSION_REF=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
|
||||
- uses: actions/checkout@v2
|
||||
- uses: docker/login-action@v1
|
||||
if: ${{ !env.ACT }}
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- uses: docker/login-action@v1
|
||||
if: ${{ !env.ACT }}
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- run: |
|
||||
docker build --build-arg "BUILD_VERSION=${{ env.BUILD_VERSION_REF }}" \
|
||||
--tag ghcr.io/cortezaproject/corteza-server:${{ env.BUILD_VERSION_SHA }} \
|
||||
--tag ghcr.io/cortezaproject/corteza-server:${{ env.BUILD_VERSION_REF }} \
|
||||
--file Dockerfile.snapshot \
|
||||
.
|
||||
if: ${{ !env.ACT }}
|
||||
- run: docker push ghcr.io/cortezaproject/corteza-server:${{ env.BUILD_VERSION_SHA }}
|
||||
if: ${{ !env.ACT }}
|
||||
- run: docker push ghcr.io/cortezaproject/corteza-server:${{ env.BUILD_VERSION_REF }}
|
||||
if: ${{ !env.ACT }}
|
||||
@@ -1,27 +0,0 @@
|
||||
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
|
||||
#
|
||||
# You can adjust the behavior by modifying this file.
|
||||
# For more information, see:
|
||||
# https://github.com/actions/stale
|
||||
name: Mark stale issues and pull requests
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '27 6 * * *'
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
- uses: actions/stale@v3
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-issue-message: 'Stale issue message'
|
||||
stale-pr-message: 'Stale pull request message'
|
||||
stale-issue-label: 'no-issue-activity'
|
||||
stale-pr-label: 'no-pr-activity'
|
||||
Reference in New Issue
Block a user