forked from sirius/actions-laba-1
Compare commits
40 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e14114c6a7 | |||
| b5d83dc351 | |||
| a5100b9466 | |||
| 00f78899e1 | |||
| 5b2add6c6f | |||
| cf929cea25 | |||
| 688bd3a7f9 | |||
| c6d885e0be | |||
| 02512a4895 | |||
| ebf8e91ca1 | |||
| 0a31d7b7ae | |||
| ac0de60ec0 | |||
| 2e2bd2dc1f | |||
| ba1f9da7cb | |||
| cb1cc8137e | |||
| bf4b910da9 | |||
| 9006862d80 | |||
| 4e2fe2cd88 | |||
| 74519aabc1 | |||
| 5a9d16de59 | |||
| 946568665d | |||
| 599156f8b3 | |||
| 4b7b861263 | |||
| a485f333a4 | |||
| 90ebee91ae | |||
| e42e641898 | |||
| b0245c89da | |||
| 76841ae85a | |||
| 9ff4134367 | |||
| c810bb889a | |||
| 7cca6f856d | |||
| 65c8b55f54 | |||
| a8cbb476ba | |||
| cee776d263 | |||
| b231032a6e | |||
| 10dae7e9ca | |||
| 250d85492e | |||
| 9fbacc3cd4 | |||
| bef7ffda19 | |||
| d42a17e98e |
43
.gitea/workflows/example-action.yaml
Normal file
43
.gitea/workflows/example-action.yaml
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
name: "Example action"
|
||||||
|
run-name: "Start example action"
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- v*.*.*
|
||||||
|
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
second-job:
|
||||||
|
runs-on: sirius # docker, sirius или golang
|
||||||
|
steps:
|
||||||
|
- run: |
|
||||||
|
if [ ${{ gitea.actor }} == 'VlaDislava28' ]; then
|
||||||
|
echo "Hello, ${{ gitea.actor }}"
|
||||||
|
else
|
||||||
|
echo "Hello, Vlada"
|
||||||
|
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) }}"
|
||||||
92
.gitea/workflows/example-condition.yaml
Normal file
92
.gitea/workflows/example-condition.yaml
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
name: "Example condition"
|
||||||
|
run-name: "deploy all condition"
|
||||||
|
|
||||||
|
on:
|
||||||
|
issues:
|
||||||
|
types:
|
||||||
|
- closed
|
||||||
|
- labeled
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- test.txt
|
||||||
|
- services.txt
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
issue_comment:
|
||||||
|
types:
|
||||||
|
- deploy
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check-condition:
|
||||||
|
runs-on: sirius
|
||||||
|
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) }}"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# name: "Example condition"
|
||||||
|
# run-name: "deply condition"
|
||||||
|
|
||||||
|
# on:
|
||||||
|
# issues:
|
||||||
|
# types:
|
||||||
|
# - closed
|
||||||
|
# - labeled
|
||||||
|
# push:
|
||||||
|
# paths:
|
||||||
|
# - test.txt
|
||||||
|
# - services.txt
|
||||||
|
# branches:
|
||||||
|
# - main
|
||||||
|
# issue_comment:
|
||||||
|
# types: [created]
|
||||||
|
|
||||||
|
# jobs:
|
||||||
|
# check-condition:
|
||||||
|
# runs-on: sirius
|
||||||
|
# if: |
|
||||||
|
# github.event_name != 'issue_comment' ||
|
||||||
|
# contains(github.event.comment.body, 'deploy')
|
||||||
|
|
||||||
|
# steps:
|
||||||
|
# - name: Process comment
|
||||||
|
# run: |
|
||||||
|
# if [ "${{ github.event_name }}" = "issue_comment" ]; then
|
||||||
|
# echo "Deploy command detected in comment!"
|
||||||
|
# else
|
||||||
|
# echo "Regular event: ${{ github.event_name }}"
|
||||||
|
# fi
|
||||||
|
|
||||||
|
|
||||||
|
# name: "Example condition"
|
||||||
|
# run-name: "multple condition"
|
||||||
|
|
||||||
|
# on:
|
||||||
|
# issues:
|
||||||
|
# types:
|
||||||
|
# - closed
|
||||||
|
# - labeled
|
||||||
|
# push:
|
||||||
|
# paths:
|
||||||
|
# - test.txt
|
||||||
|
# - services.txt
|
||||||
|
# branches:
|
||||||
|
# - main
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# jobs:
|
||||||
|
# check-condition:
|
||||||
|
# runs-on: sirius # docker, sirius или 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) }}"
|
||||||
19
.gitea/workflows/example-dispatch.yaml
Normal file
19
.gitea/workflows/example-dispatch.yaml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
name: "Example dispatch"
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
echo-test:
|
||||||
|
runs-on: docker # docker, sirius или golang
|
||||||
|
|
||||||
|
steps:
|
||||||
|
# Выводим текстовое сообщение
|
||||||
|
- name: Echo test
|
||||||
|
run: echo "Hello!"
|
||||||
|
|
||||||
|
- name: Install kubectl action
|
||||||
|
uses: tale/kubectl-action@v1
|
||||||
|
with:
|
||||||
|
base64-kube-config: ${{ secrets.KUBE_CONFIG }}
|
||||||
|
- run: kubectl get pods
|
||||||
20
.gitea/workflows/example-new.yaml
Normal file
20
.gitea/workflows/example-new.yaml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
name: "Example condition"
|
||||||
|
run-name: "condition 2"
|
||||||
|
|
||||||
|
on:
|
||||||
|
issues:
|
||||||
|
types:
|
||||||
|
- labeled
|
||||||
|
- opened
|
||||||
|
- unlabeled
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check-condition:
|
||||||
|
runs-on: sirius # docker, sirius или 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,10 +0,0 @@
|
|||||||
name: "My First Action"
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
second-job:
|
|
||||||
runs-on: docker
|
|
||||||
steps:
|
|
||||||
- run: env
|
|
||||||
1
services.txt
Normal file
1
services.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
fkjshjshfhsj
|
||||||
Reference in New Issue
Block a user