From 4698d2ce86ca5b018274de554b53521f00939412 Mon Sep 17 00:00:00 2001 From: wwitchq Date: Sat, 29 Nov 2025 12:21:33 +0300 Subject: [PATCH] update --- .gitea/workflows/example-action.yaml | 22 ++++++------------- .gitea/workflows/example-condition.yaml | 29 +++++++++++++++++++++++++ .gitea/workflows/example-new.yaml | 16 ++++++++++++++ services.txt | 1 + text.txt | 2 ++ 5 files changed, 55 insertions(+), 15 deletions(-) create mode 100644 .gitea/workflows/example-condition.yaml create mode 100644 .gitea/workflows/example-new.yaml create mode 100644 services.txt create mode 100644 text.txt diff --git a/.gitea/workflows/example-action.yaml b/.gitea/workflows/example-action.yaml index cd137c3..1d97a19 100644 --- a/.gitea/workflows/example-action.yaml +++ b/.gitea/workflows/example-action.yaml @@ -6,20 +6,12 @@ on: jobs: second-job: - runs-on: docker # docker, sirius или golang + runs-on: golang steps: - # Клонируем репозиторий для Runnera - - name: Checkout rpository - uses: actions/checkout@v6 + - run: | - # Выводим текстовое сообщение - - name: Echo test - run: echo "Hello!" - - # Выводим переменные окружения - - name: Show environment - run: env - - # Выводим контекст Gitea в формате JSON - - name: Show Gitea context - run: echo "${{ toJson(gitea) }}" + if [ ${{ gitea.actor }} == 'wwitchq' ]; then + echo "Hello, ${{ gitea.actor }}" + else + echo "Hello, Violetta" + fi \ No newline at end of file diff --git a/.gitea/workflows/example-condition.yaml b/.gitea/workflows/example-condition.yaml new file mode 100644 index 0000000..e47818c --- /dev/null +++ b/.gitea/workflows/example-condition.yaml @@ -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) }}" + diff --git a/.gitea/workflows/example-new.yaml b/.gitea/workflows/example-new.yaml new file mode 100644 index 0000000..e76deb6 --- /dev/null +++ b/.gitea/workflows/example-new.yaml @@ -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) }}" \ No newline at end of file diff --git a/services.txt b/services.txt new file mode 100644 index 0000000..b4f0ec4 --- /dev/null +++ b/services.txt @@ -0,0 +1 @@ +uraaaaaa \ No newline at end of file diff --git a/text.txt b/text.txt new file mode 100644 index 0000000..9de6ed3 --- /dev/null +++ b/text.txt @@ -0,0 +1,2 @@ +hello +good \ No newline at end of file -- 2.39.5