forked from sirius/actions-laba-1
Compare commits
21 Commits
b231032a6e
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 6fdda1a47f | |||
| 4698d2ce86 | |||
| 10430540ed | |||
| 9006862d80 | |||
| 4e2fe2cd88 | |||
| 74519aabc1 | |||
| 5a9d16de59 | |||
| 946568665d | |||
| 599156f8b3 | |||
| 4b7b861263 | |||
| a485f333a4 | |||
| 90ebee91ae | |||
| e42e641898 | |||
| b0245c89da | |||
| 76841ae85a | |||
| 9ff4134367 | |||
| c810bb889a | |||
| 7cca6f856d | |||
| 65c8b55f54 | |||
| a8cbb476ba | |||
| cee776d263 |
@@ -3,23 +3,16 @@ run-name: "Start example action"
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v*.*.*
|
||||
|
||||
jobs:
|
||||
second-job:
|
||||
runs-on: docker # docker, sirius или golang
|
||||
runs-on: golang
|
||||
steps:
|
||||
# Клонируем репозиторий для Runnera
|
||||
- name: Checkout rpository
|
||||
uses: actions/checkout@v6
|
||||
|
||||
# Выводим текстовое сообщение
|
||||
- name: Echo test
|
||||
run: echo "Hello!"
|
||||
|
||||
# Выводим переменные окружения
|
||||
- name: Show environment
|
||||
run: env
|
||||
|
||||
# Выводим контекст Gitea в формате JSON
|
||||
- name: Show Gitea context
|
||||
run: echo "${{ toJson(gitea) }}"
|
||||
- run: |
|
||||
if [ ${{ gitea.actor }} == 'wwitchq' ]; then
|
||||
echo "Hello, ${{ gitea.actor }}"
|
||||
else
|
||||
echo "Hello, Violetta"
|
||||
fi
|
||||
|
||||
28
.gitea/workflows/example-condition.yaml
Normal file
28
.gitea/workflows/example-condition.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
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) }}"
|
||||
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
|
||||
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