fix: package.json & package-lock.json to reduce vulnerabilities #246
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: Check notification | |
on: | |
push: {} | |
release: {} | |
jobs: | |
success: | |
name: One with everything | |
runs-on: ubuntu-18.04 | |
steps: | |
- uses: actions/checkout@master | |
- name: MSTeams Notification | |
uses: ./ | |
if: always() | |
with: | |
webhook_url: ${{ secrets.MSTEAMS_WEBHOOK }} | |
needs: ${{ toJson(needs) }} | |
job: ${{ toJson(job) }} | |
steps: ${{ toJson(steps) }} | |
dry_run: ${{ !github.event.action == 'release' }} | |
needy_one: | |
name: One with needs | |
needs: success | |
runs-on: ubuntu-18.04 | |
steps: | |
- uses: actions/checkout@master | |
- name: MSTeams Notification | |
uses: ./ | |
if: always() | |
with: | |
webhook_url: ${{ secrets.MSTEAMS_WEBHOOK }} | |
needs: ${{ toJson(needs) }} | |
job: ${{ toJson(job) }} | |
steps: ${{ toJson(steps) }} | |
dry_run: ${{ !github.event.action == 'release' }} | |
steps_one: | |
name: One with steps | |
needs: success | |
runs-on: ubuntu-18.04 | |
steps: | |
- name: Checkout from version control | |
uses: actions/checkout@master | |
- name: Do nothing 1 | |
uses: skitionek/star-wars-quote-action@master | |
- name: Do nothing 2 | |
uses: skitionek/star-wars-quote-action@master | |
- name: MSTeams Notification | |
uses: ./ | |
if: always() | |
with: | |
webhook_url: ${{ secrets.MSTEAMS_WEBHOOK }} | |
needs: ${{ toJson(needs) }} | |
job: ${{ toJson(job) }} | |
steps: ${{ toJson(steps) }} | |
dry_run: ${{ !github.event.action == 'release' }} | |
failure: | |
name: One failure | |
runs-on: ubuntu-18.04 | |
steps: | |
- uses: actions/checkout@master | |
- id: Forced_failure | |
name: Forced failing step | |
run: | | |
echo "Output of this action will be localy overwriten to be a failure" | |
echo "::set-output name=set_status::so_it_is_not_neglected" | |
- name: Overwrite status | |
id: overwrites | |
env: | |
steps: ${{ toJson(steps) }} | |
needs: ${{ toJson(needs) }} | |
run: | | |
echo "needs<<EOF" >> $GITHUB_ENV | |
echo $needs | jq '.[].result = "failure"' >> $GITHUB_ENV | |
echo "EOF" >> $GITHUB_ENV | |
echo "steps<<EOF" >> $GITHUB_ENV | |
echo $steps | jq '.[].outcome = "failure"' >> $GITHUB_ENV | |
echo "EOF" >> $GITHUB_ENV | |
- name: Check overwrites | |
env: | |
steps: ${{ env.steps }} | |
needs: ${{ env.needs }} | |
run: | | |
echo "Needs: $needs" | |
echo "Steps: $steps" | |
- name: MSTeams Notification | |
uses: ./ | |
if: always() | |
with: | |
webhook_url: ${{ secrets.MSTEAMS_WEBHOOK }} | |
needs: ${{ env.needs }} | |
job: ${{ toJson(job) }} | |
steps: ${{ env.steps }} | |
dry_run: ${{ !github.event.action == 'release' }} | |
- name: Confirm finish | |
run: | | |
echo 'MSTeams failure notification succeeded' | |
without_optional_params: | |
name: One with little info | |
runs-on: ubuntu-18.04 | |
steps: | |
- uses: actions/checkout@master | |
- name: MSTeams Notification | |
uses: ./ | |
if: always() | |
with: | |
webhook_url: ${{ secrets.MSTEAMS_WEBHOOK }} | |
dry_run: ${{ !github.event.action == 'release' }} | |
with_overwrite: | |
name: One with overwrite | |
runs-on: ubuntu-18.04 | |
steps: | |
- uses: actions/checkout@master | |
- name: MSTeams Notification | |
uses: ./ | |
if: always() | |
with: | |
webhook_url: ${{ secrets.MSTEAMS_WEBHOOK }} | |
overwrite: "{title: `Overwrote title in ${workflow_link}`}" | |
job: ${{ toJson(job) }} | |
steps: ${{ toJson(steps) }} | |
dry_run: ${{ !github.event.action == 'release' }} | |
with_raw: | |
name: One with raw data | |
runs-on: ubuntu-18.04 | |
steps: | |
- uses: actions/checkout@master | |
- name: MSTeams Notification | |
uses: ./ | |
if: always() | |
with: | |
webhook_url: ${{ secrets.MSTEAMS_WEBHOOK }} | |
raw: >- | |
{ | |
"@type": "MessageCard", | |
"@context": "http://schema.org/extensions", | |
"title": "No ${variables} avaliable in here", | |
"text": "Lorem ipssum" | |
} | |
dry_run: ${{ !github.event.action == 'release' }} |