Тищенко Владислава Дмитриевна #3
@@ -1,5 +1,5 @@
|
|||||||
name: "Example condition"
|
name: "Example condition"
|
||||||
run-name: "multple condition"
|
run-name: "deply condition"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
issues:
|
issues:
|
||||||
@@ -12,16 +12,52 @@ on:
|
|||||||
- services.txt
|
- services.txt
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
# ПРОСТОЕ ДОПОЛНЕНИЕ: при комментарии в issue
|
||||||
|
issue_comment:
|
||||||
|
types: [created]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-condition:
|
check-condition:
|
||||||
runs-on: sirius # docker, sirius или golang
|
runs-on: sirius
|
||||||
if: contains(github.event.issue.labels.*.name, 'bug')
|
# ПРОСТОЕ УСЛОВИЕ: только если комментарий содержит "deploy"
|
||||||
|
if: |
|
||||||
|
github.event_name != 'issue_comment' ||
|
||||||
|
contains(github.event.comment.body, 'deploy')
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Выводим текстовое сообщение
|
- name: Process comment
|
||||||
- name: Echo test
|
run: |
|
||||||
if: contains(github.event.issue.labels.*.name, 'bug')
|
if [ "${{ github.event_name }}" = "issue_comment" ]; then
|
||||||
run: echo "${{ toJson(github.event.issue) }}"
|
echo "Deploy command detected in comment!"
|
||||||
|
else
|
||||||
|
echo "Regular event: ${{ github.event_name }}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# name: "Example condition"
|
||||||
|
# run-name: "multple condition"
|
||||||
|
|
||||||
|
# on:
|
||||||
|
# issues:
|
||||||
|
# types:
|
||||||
|
# - closed
|
||||||
|
# - labeled
|
||||||
|
# push:
|
||||||
|
# paths:
|
||||||
|
# - test.txt
|
||||||
|
# - services.txt
|
||||||
|
# branches:
|
||||||
|
# - main
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# jobs:
|
||||||
|
# check-condition:
|
||||||
|
# runs-on: sirius # docker, sirius или golang
|
||||||
|
# if: contains(github.event.issue.labels.*.name, 'bug')
|
||||||
|
|
||||||
|
# steps:
|
||||||
|
# # Выводим текстовое сообщение
|
||||||
|
# - name: Echo test
|
||||||
|
# if: contains(github.event.issue.labels.*.name, 'bug')
|
||||||
|
# run: echo "${{ toJson(github.event.issue) }}"
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
micro
|
micro
|
||||||
like
|
like
|
||||||
cool
|
cool
|
||||||
|
|
||||||
|
djgdhhudhuehjkeshjd
|
||||||
Reference in New Issue
Block a user