From 7f365bb5942f2eb193fdc774863b042821ef1ca9 Mon Sep 17 00:00:00 2001 From: Nikita Elfimov Date: Fri, 23 Aug 2024 09:29:18 +0300 Subject: [PATCH] fix(github): checks and release --- .github/workflows/checks.yml | 19 +++----------- .github/workflows/release.yaml | 46 +++++++++++----------------------- 2 files changed, 19 insertions(+), 46 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 078781c1f..7c0bd1b76 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -1,23 +1,12 @@ name: Checks -on: [pull_request] +on: + - pull_request jobs: check: - name: Typecheck, lint + name: Checks uses: atls/shared/.github/workflows/checks.yaml@master permissions: write-all with: - node-version: '18' - release: - name: Release - uses: atls/shared/.github/workflows/release.yaml@master - permissions: write-all - with: - node-version: '18' - test: - name: Tests - uses: atls/shared/.github/workflows/tests.yaml@master - permissions: write-all - with: - node-version: '18' + node-version: '19' diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 43211aaba..34323906f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -2,40 +2,24 @@ name: Release on: pull_request: - types: [closed] + types: + - closed branches: - master + paths-ignore: + - '.github/**' jobs: run: + if: github.event.pull_request.merged == true name: Release - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - ref: master - - - name: Setup Node - uses: actions/setup-node@v2 - with: - node-version: '16.13' - - - name: Install - run: yarn install - - - name: Install Buildpack Cli - run: | - (curl -sSL "https://github.com/buildpacks/pack/releases/download/v0.23.0/pack-v0.23.0-linux.tgz" | sudo tar -C /usr/local/bin/ --no-same-owner -xzv pack) - - - name: Login to Yandex Container Registry - run: echo -e $YCR_KEYFILE | docker login -u json_key --password-stdin cr.yandex - env: - YCR_KEYFILE: ${{ secrets.YCR_KEYFILE }} - - - name: Release - env: - GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' - run: | - yarn workspaces changed foreach image pack --publish --tag-policy hash-timestamp --registry 'cr.yandex/${{ secrets.YCR_PROJECT_ID }}/shdvor-' + uses: atls/shared/.github/workflows/pack-image.yaml@master + permissions: write-all + with: + registryURL: 'cr.yandex' + registryUser: 'json_key' + project: ${{ secrets.YCR_PROJECT_ID }} + imageNamePrefix: 'shdvor-' + nodeVersion: '19' + secrets: + registryKey: ${{ secrets.YCR_KEYFILE }}