diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5e188bed..bd83cf77 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,7 +8,7 @@ on: jobs: setup: name: Affected Matrix - if: ${{ !contains(github.event.head_commit.message, 'skip ci') || !contains(github.event.head_commit.message, 'chore(release)') }} + if: ${{ !contains(github.event.head_commit.message, 'skip ci') && !contains(github.event.head_commit.message, 'chore(release)') }} runs-on: ubuntu-latest outputs: hasChanges: ${{ steps.affected.outputs.hasChanges }} @@ -117,6 +117,11 @@ jobs: minor: ${{ steps.release.outputs.minor }} patch: ${{ steps.release.outputs.patch }} steps: + - name: Checkout + uses: actions/checkout@v2 + with: + persist-credentials: false + - name: Obtain GitHub App Installation Access Token id: githubAppAuth run: | @@ -124,11 +129,6 @@ jobs: echo "::add-mask::$TOKEN" echo "::set-output name=token::$TOKEN" - - name: Checkout - uses: actions/checkout@v2 - with: - persist-credentials: false - - name: Download artifacts uses: actions/download-artifact@v2 with: @@ -157,6 +157,11 @@ jobs: package: ['nx-affected-matrix', 'nx-distributed-task'] needs: [setup, execute, release] steps: + - name: Checkout + uses: actions/checkout@v2 + with: + persist-credentials: false + - name: Obtain GitHub App Installation Access Token id: githubAppAuth run: | @@ -181,7 +186,6 @@ jobs: split-repository-name: ${{ matrix.package }} user-name: e-square-ci user-email: ci@e-sqiaure.io - target-branch: main - name: Update major and patch version tags if: ${{ contains(needs.setup.outputs.matrix, matrix.package) }} @@ -190,7 +194,8 @@ jobs: run: | git config user.name e-square-ci git config user.email ci@e-square.io - git remote add origin "https://$GITHUB_TOKEN@github.com/e-square-io/${{ matrix.package }}.git" + git remote set-url origin "https://github.com/e-square-io/${{ matrix.package }}.git" + git remote set-url --push origin "https://github.com/e-square-io/${{ matrix.package }}.git" git tag -d v${{ steps.release.outputs.major }} || true git tag -d v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true git push origin :v${{ steps.release.outputs.major }} || true diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index acbb58cb..36a76ad1 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -8,7 +8,7 @@ on: jobs: setup: name: Affected Matrix - if: !contains(github.event.head_commit.message, 'skip ci') + if: ${{ !contains(github.event.head_commit.message, 'skip ci') }} runs-on: ubuntu-latest outputs: hasChanges: ${{ steps.affected.outputs.hasChanges }} diff --git a/packages/utils/src/lib/nx.ts b/packages/utils/src/lib/nx.ts index b185bf93..5c798e23 100644 --- a/packages/utils/src/lib/nx.ts +++ b/packages/utils/src/lib/nx.ts @@ -17,6 +17,7 @@ export type WorkspaceProjects = WorkspaceJsonConfiguration['projects']; export function getWorkspaceProjects(): WorkspaceProjects { const workspaceFile = tree.exists('angular.json') ? 'angular.json' : 'workspace.json'; + debug(`🐞 Found ${workspaceFile} as nx workspace`); const workspaceContent: WorkspaceJsonConfiguration = JSON.parse(