Skip to content

Update main.yml

Update main.yml #124

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Event
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
pull_request:
types: [opened, reopened]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
init2:
runs-on: ubuntu-22.04
steps:
- run: echo "bonjour"
init:
runs-on: ubuntu-22.04
env:
AA: coucou
steps:
- run: exit 1
build:
runs-on: ubuntu-22.04
needs: [init]
if: ${{ needs.init.result == 'success' }}
steps:
- name: Run a one-line script
run: echo "coucou"
result:
runs-on: ubuntu-22.04
needs: [build]
env:
CTX: ${{toJson(needs)}}
if: ${{ always() }}
steps:
- name: Run a one-line script
run: echo $CTX