feat(ci): discord notification #1
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
name: Open Source CI | |
on: | |
push: | |
branches: | |
- 'main' | |
- 'release/*' | |
workflow_dispatch: | |
inputs: | |
branch: | |
type: string | |
description: branch to be open sourced | |
required: false | |
default: main | |
jobs: | |
gitexporter: | |
name: Publish to Open Source | |
runs-on: self-hosted | |
steps: | |
- name: Generate token | |
id: generate_token | |
uses: getsentry/[email protected] | |
with: | |
app_id: ${{ secrets.DEEPSQUARE_BOT_APP_ID }} | |
private_key: ${{ secrets.DEEPSQUARE_BOT_APP_PRIVATE_KEY }} | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ steps.generate_token.outputs.token }} | |
fetch-depth: 0 | |
ref: ${{ inputs.branch }} | |
fetch-tags: true | |
submodules: true | |
- name: Install filter-repo dependencies | |
run: | | |
sudo apt update -y | |
sudo apt install -y \ | |
git-filter-repo | |
- name: git-exporter | |
run: | | |
set -ex | |
BRANCH="$(git branch --show-current)" | |
# remove origin for safety reasons | |
git remote remove origin | |
# filter the packages | |
git filter-repo \ | |
--path .github/workflows/open-source.yaml \ | |
--path cli \ | |
--path docs \ | |
--path grid-logger \ | |
--path ldap-connector \ | |
--path provider-job-completion-plugin \ | |
--path provider-spank-plugin \ | |
--path provider-ssh-authorized-keys \ | |
--path sbatch-service \ | |
--path smart-contracts-exporter \ | |
--path supervisor \ | |
--path CODEOWNERS \ | |
--path COMPATIBILITY_MATRIX.md \ | |
--path README.md \ | |
--path CODE_OF_CONDUCT.md \ | |
--path CONTRIBUTING.md \ | |
--path latest \ | |
--force | |
# Add open source repo as remote | |
git remote add open https://github.com/deepsquare-io/grid.git | |
git branch -M "${BRANCH}" | |
git push -u open "${BRANCH}" --force --tags |