Skip to content

Update log format and level in project #50

Update log format and level in project

Update log format and level in project #50

Workflow file for this run

# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Go
on:
pull_request:
types:
- closed
jobs:
build:
if: github.event.pull_request.merged
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Build
run: go build -o sast-link-backend
- name: Deploy to Server
uses: easingthemes/ssh-deploy@main
with:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
ARGS: "-rlgoDzvc -i --delete"
SOURCE: "./sast-link-backend"
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
TARGET: ${{ secrets.REMOTE_TARGET }}
SCRIPT_AFTER: |
sudo systemctl restart sastlink.service
- name: Send Success Message
if: ${{ success() }}
run: |
bash ./scripts/webhook.sh \
-u "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
-w ${{ secrets.WEBHOOK_URL }} \
-s sastlink -c "${{ github.event.pull_request.user.login }}" -f 'success' \
-m "https://github.com/${{ github.repository }}/commit/${{ github.sha }}"
- name: Send Fail Message
if: ${{ failure() }}
run: |
bash ./scripts/webhook.sh \
-u "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
-w ${{ secrets.WEBHOOK_URL }} \
-s sastlink -c "${{ github.event.pull_request.user.login }}" -f 'failure' \
-m "https://github.com/${{ github.repository }}/commit/${{ github.sha }}"