Add Bitbucket Cloud API token authentication support #717
Workflow file for this run
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
| # Running locally https://yonatankra.com/how-to-test-github-actions-locally-using-act/ | |
| name: Go | |
| on: pull_request | |
| jobs: | |
| build_and_test: | |
| environment: actions | |
| name: Build and Test | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [macos-latest, ubuntu-latest] | |
| steps: | |
| - name: Set up Go 1.24.6 | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: 1.24.6 | |
| id: go | |
| - name: Check out code into the Go module directory | |
| uses: actions/checkout@v4 | |
| - name: Test | |
| run: go test -v ./... | |
| - name: Build | |
| run: go build -v -o ghorg . | |
| - name: Run GitHub Cloud Integration Tests | |
| run: scripts/github_cloud_integration_tests.sh | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GHORG_GITHUB_TOKEN }} | |
| - name: Run Bitbucket Cloud Integration Tests | |
| run: scripts/bitbucket_cloud_integration_tests.sh | |
| env: | |
| # New API Token authentication (recommended) | |
| BITBUCKET_API_TOKEN: ${{ secrets.GHORG_BITBUCKET_API_TOKEN }} | |
| BITBUCKET_API_EMAIL: ${{ secrets.GHORG_BITBUCKET_API_EMAIL }} | |
| # Legacy App Password authentication (for backward compatibility testing) | |
| BITBUCKET_TOKEN: ${{ secrets.GHORG_BITBUCKET_APP_PASSWORD }} | |
| BITBUCKET_USERNAME: ${{ secrets.GHORG_BITBUCKET_USERNAME }} | |
| - name: Run GitLab Cloud Integration Tests | |
| run: scripts/gitlab_cloud_integration_tests.sh | |
| env: | |
| GITLAB_TOKEN: ${{ secrets.GHORG_GITLAB_TOKEN }} | |
| - name: Run Sourcehut Cloud Integration Tests | |
| run: scripts/sourcehut_cloud_integration_tests.sh | |
| env: | |
| SOURCEHUT_TOKEN: ${{ secrets.GHORG_SOURCEHUT_TOKEN }} | |
| SOURCEHUT_TEST_USER: ${{ secrets.GHORG_SOURCEHUT_TEST_USER }} | |
| SOURCEHUT_TEST_REPO: ${{ secrets.GHORG_SOURCEHUT_TEST_REPO }} | |
| build_and_test_windows: | |
| environment: actions | |
| name: Build and Test Windows | |
| runs-on: windows-latest | |
| steps: | |
| - name: Set up Go 1.24.6 | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: 1.24.6 | |
| id: go | |
| - name: Check out code into the Go module directory | |
| uses: actions/checkout@v4 | |
| - name: Set configuration file | |
| run: | | |
| mkdir C:\Users\runneradmin\.config\ghorg | |
| copy sample-conf.yaml C:\Users\runneradmin\.config\ghorg\conf.yaml | |
| - name: Build | |
| run: env GOOS=windows GOARCH=386 go build -v -o ghorg.exe . | |
| - name: Test | |
| run: go test -v ./... | |
| - name: Run GitHub Integration Tests | |
| run: scripts/windows_github_integration_tests.bat | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GHORG_GITHUB_TOKEN }} | |
| - name: Run Bitbucket Integration Tests | |
| run: scripts/bitbucket_cloud_integration_tests.sh | |
| env: | |
| # New API Token authentication (recommended) | |
| BITBUCKET_API_TOKEN: ${{ secrets.GHORG_BITBUCKET_API_TOKEN }} | |
| BITBUCKET_API_EMAIL: ${{ secrets.GHORG_BITBUCKET_API_EMAIL }} | |
| # Legacy App Password authentication (for backward compatibility testing) | |
| BITBUCKET_TOKEN: ${{ secrets.GHORG_BITBUCKET_APP_PASSWORD }} | |
| BITBUCKET_USERNAME: ${{ secrets.GHORG_BITBUCKET_USERNAME }} | |
| - name: Run GitLab Cloud Integration Tests Linux | |
| run: scripts/gitlab_cloud_integration_tests.sh | |
| env: | |
| GITLAB_TOKEN: ${{ secrets.GHORG_GITLAB_TOKEN }} | |
| - name: Run GitLab Cloud Integration Tests Windows | |
| run: scripts/windows_gitlab_integration_tests.bat | |
| env: | |
| GITLAB_TOKEN: ${{ secrets.GHORG_GITLAB_TOKEN }} | |
| - name: Run Sourcehut Cloud Integration Tests Linux | |
| run: scripts/sourcehut_cloud_integration_tests.sh | |
| env: | |
| SOURCEHUT_TOKEN: ${{ secrets.GHORG_SOURCEHUT_TOKEN }} | |
| SOURCEHUT_TEST_USER: ${{ secrets.GHORG_SOURCEHUT_TEST_USER }} | |
| SOURCEHUT_TEST_REPO: ${{ secrets.GHORG_SOURCEHUT_TEST_REPO }} | |
| - name: Run Sourcehut Cloud Integration Tests Windows | |
| run: scripts/windows_sourcehut_integration_tests.bat | |
| env: | |
| SOURCEHUT_TOKEN: ${{ secrets.GHORG_SOURCEHUT_TOKEN }} | |
| SOURCEHUT_TEST_USER: ${{ secrets.GHORG_SOURCEHUT_TEST_USER }} | |
| SOURCEHUT_TEST_REPO: ${{ secrets.GHORG_SOURCEHUT_TEST_REPO }} |