Add new channels to help article for submit #245
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: Commit Tasks | |
on: | |
push: | |
paths: | |
- '**.java' | |
- 'pom.xml' | |
workflow_dispatch: | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '19' | |
- name: Run mvn test | |
run: mvn test | |
check-spelling: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install Codespell | |
run: pip install codespell | |
- name: Check spelling | |
run: codespell -S=".git" | |
check-for-non-lettuce-imports: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Download script | |
run: curl https://gist.githubusercontent.com/CominAtYou/5538252475fbe317064daa5ff5d26489/raw/36a96d30fbc4d8129edac95d005c147d26259a43/CheckForImports.py -o 'importscript.py' | |
- name: Run script | |
run: python ./importscript.py | |
deploy: | |
if: ${{ !startsWith(github.event.head_commit.message, '[nodeploy]') && github.ref == 'refs/heads/master' && github.repository == 'CominAtYou/Hildabot' && github.event_name == 'push' }} | |
runs-on: ubuntu-latest | |
needs: [test, check-for-non-lettuce-imports, check-spelling] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '19' | |
- name: Prepare files | |
env: | |
CONFIG_DATA: ${{ secrets.CONFIG_DATA }} | |
run: "printf \"$CONFIG_DATA\" > $GITHUB_WORKSPACE/src/main/java/com/cominatyou/Config.java" | |
- name: Build jar | |
run: mvn clean compile assembly:single | |
- name: Deploy bot | |
env: | |
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }} | |
DEPLOY_URL: ${{ secrets.DEPLOY_URL }} | |
run: "curl -s -f -X POST -T $GITHUB_WORKSPACE/target/hildabot-*.jar -H \"Authorization: $DEPLOY_KEY\" -H \"Content-Type: application/octet-stream\" -m 30 $DEPLOY_URL" |