Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6fdda1a47f | |||
| 4698d2ce86 | |||
| 10430540ed | |||
| 9006862d80 | |||
| 4e2fe2cd88 | |||
| 74519aabc1 | |||
| 5a9d16de59 | |||
| 946568665d | |||
| 599156f8b3 | |||
| 4b7b861263 |
@@ -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) }}"
|
|
||||||
|
|||||||
@@ -1,17 +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
|
||||||
|
push:
|
||||||
|
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: 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) }}"
|
||||||
|
|||||||
16
.gitea/workflows/example-new.yaml
Normal file
16
.gitea/workflows/example-new.yaml
Normal 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
1
issue.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
hjkdshf ahsldf
|
||||||
Reference in New Issue
Block a user