Kick new entrants during row picking stage #437
Workflow file for this run
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: Build Barinade Bot | |
on: | |
- push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup SSH | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
uses: webfactory/ssh-agent@v0.5.0 | |
with: | |
ssh-private-key: ${{ secrets.BARINADE_SSH_KEY }} | |
- name: Save Branch Name | |
id: branch | |
run: echo ::set-output name=BRANCH::${GITHUB_REF/refs\/heads\//} | |
- name: Prepare | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Java Setup | |
uses: actions/setup-java@v2 | |
with: | |
distribution: temurin | |
java-version: 21 | |
- name: Test | |
uses: burrunan/gradle-cache-action@v1 | |
with: | |
arguments: test | |
gradle-version: wrapper | |
properties: | | |
githubPackagesUser=${{ secrets.PACKAGE_USER }} | |
githubPackagesToken=${{ secrets.PACKAGE_PWD }} | |
- name: SonarQube Scan | |
uses: sonarsource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
- name: SonarQube Quality Gate | |
id: sonarqube-quality-gate-check | |
uses: sonarsource/sonarqube-quality-gate-action@master | |
timeout-minutes: 10 | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
- name: Build | |
uses: burrunan/gradle-cache-action@v1 | |
with: | |
arguments: build -x test | |
gradle-version: wrapper | |
properties: | | |
githubPackagesUser=${{ secrets.PACKAGE_USER }} | |
githubPackagesToken=${{ secrets.PACKAGE_PWD }} | |
- name: Docker | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' }} | |
run: ./push-container.sh ${{ github.actor }} ${{ secrets.GITHUB_TOKEN }} | |
- name: Deploy | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
run: | | |
ssh -oStrictHostKeyChecking=no barinade@scaramangado.de /barinade/barinade-infrastructure/deploy.sh ${{ secrets.PACKAGE_USER }} ${{ secrets.PACKAGE_PWD}} ${GITHUB_REF#refs/heads/} | |
- name: Notify (Success) | |
uses: tsickert/discord-webhook@v5.3.0 | |
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' }} | |
with: | |
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }} | |
embed-title: Build of ${{ steps.branch.outputs.BRANCH }} successful | |
embed-color: 65280 | |
- name: Notify (Fail) | |
uses: tsickert/discord-webhook@v5.3.0 | |
if: ${{ failure() }} | |
with: | |
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }} | |
embed-title: Build of ${{ steps.branch.outputs.BRANCH }} failed | |
embed-color: 16711680 |