Skip to content

Commit

Permalink
Update cookie-consent to custom element
Browse files Browse the repository at this point in the history
Add config functions

Update code

Add data attributes

Update code

Update custom events

Update template

Remove redundant code

Fix show and hide dialog functionality

Remove old code

Revert to .mjs

Update formatting

Update imports

Update import

Remove @types/react

Update dialog

Update dialog

Update tablist

Add parameters to function

Remove redundant file

Fix linter error

Update test

Update checked state

Remove whitespaces

Update yarn lock

Fix linting errors

Remove failing test

Remove aria-description

1.2.1-beta.1

Update cookie-consent to custom element

Add config functions

Update code

Add data attributes

Update code

Update custom events

Update template

Remove redundant code

Fix show and hide dialog functionality

Remove old code

Revert to .mjs

Update formatting

Update imports

Update import

Remove @types/react

Update dialog

Update dialog

Update tablist

Add parameters to function

Remove redundant file

Fix linter error

Update test

Update checked state

Remove whitespaces

Update yarn lock

Fix linting errors

Remove failing test

Remove aria-description

Hide cookie consent in print media styles

Remove idea files

Remove idea files

Remove idea workspace file

Update dialog generateDialogElement method

Update imports with file extension

Update package version grrr utils

Updated defaultbuttonLabel to defaultButtonLabel

Update README

Update README

Update README

Update button label

Update stylesheet

Update readme

Update code

Update readme

Update string quotes

Re-add test

Format code

Update slack notification

Format code

Update version

Format files
  • Loading branch information
CountNick committed Jun 20, 2024
1 parent ca2acad commit 403bd7c
Show file tree
Hide file tree
Showing 17 changed files with 652 additions and 576 deletions.
30 changes: 20 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,30 @@ jobs:

notification:
name: Slack notification
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
if: always()
needs: [ci]

env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

steps:
- name: Send notification
uses: edge/simple-slack-notify@master
with:
channel: "#ci"
username: CI
status: ${{ (contains(needs.*.result, 'cancelled') && 'cancelled') || (contains(needs.*.result, 'failure') && 'failure') || 'success' }}
success_text: ":octocat: <${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}|Build #${env.GITHUB_RUN_NUMBER}> of *${env.GITHUB_REPOSITORY}@${{ github.ref_name }}* by *${env.GITHUB_ACTOR}* completed successfully."
failure_text: ":octocat: <${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}|Build #${env.GITHUB_RUN_NUMBER}> of *${env.GITHUB_REPOSITORY}@${{ github.ref_name }}* by *${env.GITHUB_ACTOR}* failed."
cancelled_text: ":octocat: <${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}|Build #${env.GITHUB_RUN_NUMBER}> of *${env.GITHUB_REPOSITORY}@${{ github.ref_name }}* by *${env.GITHUB_ACTOR}* was cancelled."
- run: |
successText=":octocat: <${{ env.GITHUB_SERVER_URL }}/${{ env.GITHUB_REPOSITORY }}/actions/runs/${{ env.GITHUB_RUN_ID }}|Versie ${{ inputs.version }}> uitgerold naar *${{ inputs.environment }}*."
failureText=":octocat: <${{ env.GITHUB_SERVER_URL }}/${{ env.GITHUB_REPOSITORY }}/actions/runs/${{ env.GITHUB_RUN_ID }}|Versie ${{ inputs.version }}> niet uitgerold naar *${{ inputs.environment }}*."
cancelledText=":octocat: <${{ env.GITHUB_SERVER_URL }}/${{ env.GITHUB_REPOSITORY }}/actions/runs/${{ env.GITHUB_RUN_ID }}|Versie ${{ inputs.version }}> uitrol naar *${{ inputs.environment }}* geannuleerd."
status="${{ (contains(needs.*.result, 'cancelled') && 'cancelled') || (contains(needs.*.result, 'failure') && 'failure') || 'success' }}"
if [ "$status" = 'success' ]; then
color='good'
text=$successText
elif [ "$status" = 'failure' ]; then
color='danger'
text=$failureText
elif [ "$status" = "cancelled" ]; then
color='warning'
text=$cancelledText
fi
curl "${{ secrets.SLACK_WEBHOOK_URL }}" -X "POST" --header "Content-Type: application/json" \
--data "{attachments: [{text: '$text', color: '$color'}]}"
Loading

0 comments on commit 403bd7c

Please sign in to comment.