Тищенко Владислава Дмитриевна #3

Open
VlaDislava28 wants to merge 16 commits from VlaDislava28/actions-laba-1:main into main
Showing only changes of commit 00f78899e1 - Show all commits

View File

@@ -1,5 +1,5 @@
name: "Example condition" name: "Example condition"
run-name: "deply condition" run-name: "deploy all condition"
on: on:
issues: issues:
@@ -15,21 +15,50 @@ on:
issue_comment: issue_comment:
types: [created] types: [created]
if: github.event_name != 'issue_comment' || github.actor == 'Vlabislava28'
jobs: jobs:
check-condition: check-condition:
runs-on: sirius runs-on: sirius
if: |
github.event_name != 'issue_comment' ||
contains(github.event.comment.body, 'deploy')
steps: steps:
- name: Process comment - name: Echo test
run: | run: echo "Этот шаг выполнится только при выполнении условия above"
if [ "${{ github.event_name }}" = "issue_comment" ]; then
echo "Deploy command detected in comment!"
else
echo "Regular event: ${{ github.event_name }}" # name: "Example condition"
fi # run-name: "deply condition"
# on:
# issues:
# types:
# - closed
# - labeled
# push:
# paths:
# - test.txt
# - services.txt
# branches:
# - main
# issue_comment:
# types: [created]
# jobs:
# check-condition:
# runs-on: sirius
# if: |
# github.event_name != 'issue_comment' ||
# contains(github.event.comment.body, 'deploy')
# steps:
# - name: Process comment
# run: |
# if [ "${{ github.event_name }}" = "issue_comment" ]; then
# echo "Deploy command detected in comment!"
# else
# echo "Regular event: ${{ github.event_name }}"
# fi
# name: "Example condition" # name: "Example condition"