2 Commits
main ... main

Author SHA1 Message Date
6fdda1a47f update 2025-11-29 12:58:15 +03:00
4698d2ce86 update 2025-11-29 12:21:33 +03:00
3 changed files with 37 additions and 42 deletions

View File

@@ -8,35 +8,11 @@ on:
jobs: jobs:
second-job: second-job:
runs-on: docker # docker, sirius или golang runs-on: golang
steps: steps:
- run: | - run: |
if [ ${{ gitea.actor }} == 'alex' ]; then if [ ${{ gitea.actor }} == 'wwitchq' ]; then
echo "Hello, ${{ gitea.actor }}" echo "Hello, ${{ gitea.actor }}"
else else
echo "Hello, student" echo "Hello, Violetta"
fi 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,25 +1,28 @@
name: "Example condition" name: "Example condition"
run-name: "Check Job condition" run-name: "deploy all condition"
on: on:
issues: issues:
types: types:
- closed
- labeled - labeled
- opened push:
- unlabeled paths:
- test.txt
- services.txt
branches:
- main
issue_comment:
types:
- created
jobs: jobs:
check-condition: check-condition:
runs-on: sirius # docker, sirius или golang runs-on: golang
# if: contains(github.event.issue.labels.*.name, 'bug') if: contains(github.event.issue.labels.*.name, 'bug')
steps: steps:
# Поздароваемся - name: Echo test
- name: Hello run: echo "Этот шаг выполнится только при выполнении условия above"
if: github.event.issue.user.login == 'alex'
run: echo "Hello, Alex!!!"
# Выводим текстовое сообщение
- name: Echo test - name: Echo test
if: contains(github.event.issue.labels.*.name, 'bug') if: contains(github.event.issue.labels.*.name, 'bug')
run: echo "${{ toJson(github.event.issue) }}" 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) }}"