From da66eea90c1edf7acbd1be9cc81e2a065cbcf5aa Mon Sep 17 00:00:00 2001 From: Artem Derevnjuk Date: Mon, 4 Mar 2024 21:40:24 +0400 Subject: [PATCH] ci: pin version of `upload-release-action` --- .github/workflows/deploy.yml | 72 ++---------------------------------- 1 file changed, 3 insertions(+), 69 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d6260e3f..5a5001c7 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -3,10 +3,11 @@ name: Automated deploy on: release: types: [ created ] + workflow_dispatch: env: - VERSION: ${{ github.event.release.tag_name }} - TARGET_REF: ${{ github.event.release.target_commitish }} + VERSION: "v11.5.0-next.1" + TARGET_REF: "9197b50080a4796e1b7547f5c381c70005f684d9" jobs: install-deps: @@ -131,70 +132,3 @@ jobs: file: .\bin\bright-cli.msi asset_name: bright-cli.msi tag: ${{ github.ref }} - - publish: - runs-on: ubuntu-latest - needs: build - steps: - - uses: actions/checkout@v3 - with: - ref: ${{ env.TARGET_REF }} - token: ${{ secrets.GPR_TOKEN }} - - - uses: actions/download-artifact@v3 - with: - name: build - - - name: Setup node - uses: ./.github/workflows/composite/npm - - - name: Set TAG based on target_commitish - run: | - if [ "${{ github.event.release.target_commitish }}" == "next" ]; then - echo "TAG=next" >> $GITHUB_ENV - elif [ "${{ github.event.release.target_commitish }}" == "alpha" ]; then - echo "TAG=alpha" >> $GITHUB_ENV - elif [ "${{ github.event.release.target_commitish }}" == "master" ]; then - echo "TAG=latest" >> $GITHUB_ENV - else - exit 1 - fi - - - name: Set NPM distribution - run: npm pkg set brightCli.distribution=npm - - - run: npm publish --tag $TAG - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - # The scope does not align with the package name - # FIXME: once GitHub organization name has been changed, we should prevent this behavior - - name: Prepare GPR package - run: | - npm pkg set name='@neuralegion/bright-cli' \ - && npm pkg set brightCli.distribution=gpr - - - name: Setup node - uses: ./.github/workflows/composite/npm - with: - registry: 'https://npm.pkg.github.com' - scope: '@NeuraLegion' - - - run: npm publish --tag $TAG - env: - NODE_AUTH_TOKEN: ${{ secrets.GPR_TOKEN }} - - - run: sleep 30 - - - name: Prepare Image Tags - run: | - echo "TAG_REPEATER=brightsec/cli" >> $GITHUB_ENV - - - name: Build Images - run: | - docker build . --file Dockerfile --build-arg VERSION=$VERSION -t $TAG_REPEATER:$VERSION -t $TAG_REPEATER:$TAG - - - name: Push Images - run: | - docker login --username=${{ secrets.DOCKERHUB_BRIGHT_USER }} --password=${{ secrets.DOCKERHUB_BRIGHT_TOKEN }} - docker push $TAG_REPEATER --all-tags