main #5

Open
wwitchq wants to merge 2 commits from wwitchq/actions-laba-1-v:main into main
5 changed files with 55 additions and 15 deletions
Showing only changes of commit 4698d2ce86 - Show all commits

View File

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

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