10 Commits

Author SHA1 Message Date
6fdda1a47f update 2025-11-29 12:58:15 +03:00
4698d2ce86 update 2025-11-29 12:21:33 +03:00
10430540ed Update 2025-11-25 15:01:10 +03:00
9006862d80 Update 2025-11-25 14:09:19 +03:00
4e2fe2cd88 Update 2025-11-25 14:00:34 +03:00
74519aabc1 Update test.txt
All checks were successful
Example condition / check-condition (push) Has been skipped
2025-11-25 13:59:41 +03:00
5a9d16de59 Update action 2025-11-25 13:59:11 +03:00
946568665d Update test.txt 2025-11-25 13:58:31 +03:00
599156f8b3 Update action 2025-11-25 13:57:57 +03:00
4b7b861263 Add test.txt 2025-11-25 13:57:00 +03:00
5 changed files with 43 additions and 35 deletions

View File

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

View File

@@ -1,17 +1,28 @@
name: "Example condition"
run-name: "Check Job condition"
run-name: "deploy all condition"
on:
issues:
types:
types:
- closed
- labeled
push:
paths:
- test.txt
- services.txt
branches:
- main
issue_comment:
types:
- created
jobs:
check-condition:
runs-on: sirius # docker, sirius или golang
check-condition:
runs-on: golang
if: contains(github.event.issue.labels.*.name, 'bug')
steps:
# Выводим текстовое сообщение
- name: Echo test
run: echo "${{ toJson(gitea.event.issue) }}"
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
issue.json Normal file
View File

@@ -0,0 +1 @@
hjkdshf ahsldf

4
test.txt Normal file
View File

@@ -0,0 +1,4 @@
hdjksfh adhsjfk hadslkjh
jkfbjkasdbf asdj fhaksdj hf jklasdl
sakfdh kashf khaslfkh aksdfhljh