diff --git a/.gitea/workflows/example-action.yaml b/.gitea/workflows/example-action.yaml index 41b34ea..d25f3dc 100644 --- a/.gitea/workflows/example-action.yaml +++ b/.gitea/workflows/example-action.yaml @@ -6,15 +6,16 @@ on: tags: - v*.*.* + jobs: second-job: - runs-on: docker # docker, sirius или golang + runs-on: sirius # docker, sirius или golang steps: - run: | - if [ ${{ gitea.actor }} == 'alex' ]; then + if [ ${{ gitea.actor }} == 'VlaDislava28' ]; then echo "Hello, ${{ gitea.actor }}" else - echo "Hello, student" + echo "Hello, Vlada" fi # Клонируем репозиторий для Runnera diff --git a/.gitea/workflows/example-condition.yaml b/.gitea/workflows/example-condition.yaml index 9fa904d..81545a7 100644 --- a/.gitea/workflows/example-condition.yaml +++ b/.gitea/workflows/example-condition.yaml @@ -1,20 +1,92 @@ name: "Example condition" -run-name: "Check Job condition" +run-name: "deploy all condition" on: issues: types: + - closed - labeled - - opened - - unlabeled + push: + paths: + - test.txt + - services.txt + branches: + - main + issue_comment: + types: + - deploy jobs: check-condition: - runs-on: sirius # docker, sirius или golang - # if: contains(github.event.issue.labels.*.name, 'bug') - + runs-on: sirius + if: contains(github.event.issue.labels.*.name, 'bug') steps: - # Выводим текстовое сообщение - name: Echo test - # if: contains(github.event.issue.labels.*.name, 'bug') + 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) }}" diff --git a/.gitea/workflows/example-new.yaml b/.gitea/workflows/example-new.yaml new file mode 100644 index 0000000..2ad888c --- /dev/null +++ b/.gitea/workflows/example-new.yaml @@ -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) }}" diff --git a/services.txt b/services.txt new file mode 100644 index 0000000..551ae9a --- /dev/null +++ b/services.txt @@ -0,0 +1 @@ +fkjshjshfhsj \ No newline at end of file diff --git a/test.txt b/test.txt index 5005bd2..d57ddec 100644 --- a/test.txt +++ b/test.txt @@ -1,4 +1,2 @@ -hdjksfh adhsjfk hadslkjh -jkfbjkasdbf asdj fhaksdj hf jklasdl - -sakfdh kashf khaslfkh aksdfhljh \ No newline at end of file +hello, myself +dejdjkdwkaj \ No newline at end of file