diff --git a/.gitea/workflows/example-action.yaml b/.gitea/workflows/example-action.yaml index 41b34ea..39bed47 100644 --- a/.gitea/workflows/example-action.yaml +++ b/.gitea/workflows/example-action.yaml @@ -8,35 +8,11 @@ on: jobs: second-job: - runs-on: docker # docker, sirius или golang + runs-on: golang steps: - run: | - if [ ${{ gitea.actor }} == 'alex' ]; then - echo "Hello, ${{ gitea.actor }}" + if [ ${{ gitea.actor }} == 'wwitchq' ]; then + echo "Hello, ${{ gitea.actor }}" else - echo "Hello, student" + echo "Hello, Violetta" 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) }}" diff --git a/.gitea/workflows/example-condition.yaml b/.gitea/workflows/example-condition.yaml index e5a7f81..af471f8 100644 --- a/.gitea/workflows/example-condition.yaml +++ b/.gitea/workflows/example-condition.yaml @@ -1,25 +1,28 @@ name: "Example condition" -run-name: "Check Job condition" +run-name: "deploy all condition" on: issues: - types: + types: + - closed - labeled - - opened - - unlabeled + push: + paths: + - test.txt + - services.txt + branches: + - main + issue_comment: + types: + - created jobs: - check-condition: - runs-on: sirius # docker, sirius или golang - # if: contains(github.event.issue.labels.*.name, 'bug') - + check-condition: + runs-on: golang + if: contains(github.event.issue.labels.*.name, 'bug') steps: - # Поздароваемся - - name: Hello - if: github.event.issue.user.login == 'alex' - run: echo "Hello, Alex!!!" - - # Выводим текстовое сообщение + - 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