Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Bump eslint from 9.0.0 to 9.1.1 #131

Bump eslint from 9.0.0 to 9.1.1

Bump eslint from 9.0.0 to 9.1.1 #131

Workflow file for this run

name: Validate
on:
pull_request:
branches:
- main
permissions: read-all
jobs:
run_docker:
runs-on: ubuntu-latest
name: Run Docker
outputs:
result: ${{ steps.validate_bot.outputs.result }}
steps:
- uses: actions/checkout@v4
- name: Build and run Docker
run: |
echo "${{ secrets.ENV }}" > .env
cp .help.example .help
make
shell: bash
- name: Validate bot
id: validate_bot
run: |
# Define a function to send a message to Slack and store the result
out=true;
send_message() {
text=$1
ok=$(curl -d "text=<@${{ vars.VALIDATE_BOTID }}> $text" -d "channel=${{ secrets.VALIDATE_CHANNEL }}" \
-H "Authorization: Bearer ${{ secrets.VALIDATE_TOKEN }}" \
-X POST https://slack.com/api/chat.postMessage | jq .ok)
if [ "$ok" = false ] ; then
out=false;
fi
}
# Loop through the messages and call the function with a counter
messages=(":wave:" "gh-targets" "help" "gh-run confirm_run.yml --inputs choice_name:choice2" \
"gh-run confirm_run.yml" "gh-lock add dummy" "gh-deploy main to dummy" "gh-lock show dummy" \
"gh-lock remove dummy" "gh-deploy main to dummy")
counter=1
for message in "${messages[@]}"; do
send_message "$message" "$counter"
sleep 5
((counter++))
done
echo "result=$out" >> $GITHUB_OUTPUT
shell: bash
no_fail_check:
needs:
- run_docker
runs-on: ubuntu-latest
name: Validate - No failure
steps:
- if: needs.run_docker.outputs.result == 'true'
run: echo "Success!"
- if: needs.run_docker.outputs.result != 'true'
run: exit 1