Files
actions-laba-1/.gitea/workflows/example-condition.yaml
2025-11-25 16:54:51 +03:00

95 lines
1.9 KiB
YAML

name: "Example condition"
run-name: "deploy all condition"
on:
issues:
types:
- closed
- labeled
push:
paths:
- test.txt
- services.txt
branches:
- main
issue_comment:
types:
- deploy
if: github.event_name != 'issue_comment' || github.actor == 'Vlabislava28'
jobs:
check-condition:
runs-on: sirius
steps:
- name: Echo test
run: echo "Этот шаг выполнится только при выполнении условия above"
- name: Echo test
if: contains(github.event.issue.labels.*.name, 'bug')
run: echo "${{ toJson(github.event.issue) }}"
# name: "Example condition"
# 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"
# 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) }}"