ci(publish-npm): upgrade npm so OIDC Trusted Publishing works (#80) #131
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Sync to buildspace (public) | |
| on: | |
| push: | |
| branches: [main] | |
| jobs: | |
| sync-to-public: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout buildspace-private repo | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Sync to public buildspace | |
| run: | | |
| git config --global user.name "${{ github.actor }}" | |
| git config --global user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com" | |
| echo "Removing sync.yaml to prevent circular pushes..." | |
| git rm -f .github/workflows/sync.yaml | |
| git commit -m "chore: remove sync workflow for public repo [skip ci]" | |
| git remote add public https://oauth2:${{ secrets.SYNC_TOKEN }}@github.com/photon-hq/buildspace-private.git | |
| git push public --force --all | |
| git push public --force --tags |