This commit is contained in:
2025-11-29 12:21:33 +03:00
parent b231032a6e
commit 4698d2ce86
5 changed files with 55 additions and 15 deletions

View File

@@ -6,20 +6,12 @@ on:
jobs:
second-job:
runs-on: docker # docker, sirius или golang
runs-on: golang
steps:
# Клонируем репозиторий для Runnera
- name: Checkout rpository
uses: actions/checkout@v6
- run: |
# Выводим текстовое сообщение
- name: Echo test
run: echo "Hello!"
# Выводим переменные окружения
- name: Show environment
run: env
# Выводим контекст Gitea в формате JSON
- name: Show Gitea context
run: echo "${{ toJson(gitea) }}"
if [ ${{ gitea.actor }} == 'wwitchq' ]; then
echo "Hello, ${{ gitea.actor }}"
else
echo "Hello, Violetta"
fi

View File

@@ -0,0 +1,29 @@
name: "Example condition"
run-name: "deploy all condition"
on:
issues:
types:
- closed
- labeled
push:
paths:
- test.txt
- services.txt
branches:
- main
issue_comment:
types:
- created
jobs:
check-condition:
runs-on: golang
if: contains(github.event.issue.labels.*.name, 'bug')
steps:
- name: Echo test
run: echo "Этот шаг выполнится только при выполнении условия above"
- name: Echo test
if: contains(github.event.issue.labels.*.name, 'bug')
run: echo "${{ toJson(github.event.issue) }}"

View File

@@ -0,0 +1,16 @@
name: "Example condition"
run-name: "condition 2"
on:
issues:
types:
- labeled
- opened
- unlabeled
jobs:
check-condition:
runs-on: 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
services.txt Normal file
View File

@@ -0,0 +1 @@
uraaaaaa

2
text.txt Normal file
View File

@@ -0,0 +1,2 @@
hello
good