From 7b0809772c332e60ba8c6b6d684c4274a989b022 Mon Sep 17 00:00:00 2001 From: Maxim Slipenko Date: Tue, 26 Sep 2023 10:39:06 +0300 Subject: [PATCH] =?UTF-8?q?ci:=20=D1=81=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB=20?= =?UTF-8?q?=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=B2?= =?UTF-8?q?=20CI=20(#1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - добавил push-зеркало (GitFlic) (mirror.yml) - добавил auto-assign (auto-assign.yml) - исправил права доступа для release.yml и pr-title.yml --- .github/workflows/auto-assign.yml | 16 ++++++++++++++++ .github/workflows/mirror.yml | 21 +++++++++++++++++++++ .github/workflows/pr-title.yml | 4 ++++ .github/workflows/release.yml | 6 +++++- 4 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/auto-assign.yml create mode 100644 .github/workflows/mirror.yml diff --git a/.github/workflows/auto-assign.yml b/.github/workflows/auto-assign.yml new file mode 100644 index 0000000..9492d0e --- /dev/null +++ b/.github/workflows/auto-assign.yml @@ -0,0 +1,16 @@ +name: Auto Assign + +on: + pull_request: + types: + - opened + - reopened + +jobs: + add_assignees: + runs-on: ubuntu-latest + steps: + - uses: actions-ecosystem/action-add-assignees@v1 + with: + github_token: ${{ secrets.github_token }} + assignees: ${{ github.actor }} \ No newline at end of file diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml new file mode 100644 index 0000000..8693881 --- /dev/null +++ b/.github/workflows/mirror.yml @@ -0,0 +1,21 @@ +name: 'Синхронизация зеркал' + +on: + push: + branches: + - main + workflow_dispatch: + schedule: + - cron: "0 */6 * * *" + +jobs: + mirror: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: pixta-dev/repository-mirroring-action@674e65a7d483ca28dafaacba0d07351bdcc8bd75 # v1.1.1 + with: + target_repo_url: "git@gitflic.ru:shizand/statapp.git" + ssh_private_key: ${{ secrets.GITFLIC_SSH }} \ No newline at end of file diff --git a/.github/workflows/pr-title.yml b/.github/workflows/pr-title.yml index 3221a02..a2295ad 100644 --- a/.github/workflows/pr-title.yml +++ b/.github/workflows/pr-title.yml @@ -8,6 +8,10 @@ on: - edited - synchronize +permissions: + pull-requests: write + + jobs: main: name: Проверка PR заголовка diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fbbf95a..51d3231 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,6 +5,10 @@ on: branches: - main +permissions: + contents: write + pull-requests: write + jobs: release: name: release @@ -29,4 +33,4 @@ jobs: @semantic-release/git @semantic-release/changelog env: - GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file