diff --git a/.github/workflows/arc-publish-chart.yaml b/.github/workflows/arc-publish-chart.yaml index 96f03f2289..93189f8c75 100644 --- a/.github/workflows/arc-publish-chart.yaml +++ b/.github/workflows/arc-publish-chart.yaml @@ -13,6 +13,10 @@ on: - '!charts/gha-runner-scale-set-controller/**' - '!charts/gha-runner-scale-set/**' - '!**.md' + # test + pull_request: + branches: + - master workflow_dispatch: inputs: force: @@ -128,7 +132,7 @@ jobs: permissions: contents: write # for helm/chart-releaser-action to push chart release and create a release env: - CHART_TARGET_ORG: actions-runner-controller + CHART_TARGET_ORG: devzero-inc CHART_TARGET_REPO: actions-runner-controller.github.io CHART_TARGET_BRANCH: master @@ -147,8 +151,8 @@ jobs: id: get_workflow_token uses: peter-murray/workflow-application-token-action@dc0413987a085fa17d19df9e47d4677cf81ffef3 with: - application_id: ${{ secrets.ACTIONS_ACCESS_APP_ID }} - application_private_key: ${{ secrets.ACTIONS_ACCESS_PK }} + application_id: ${{ secrets.WORKFLOW_ACTIONS_APP_ID }} + application_private_key: ${{ secrets.WORKFLOW_ACTIONS_PEM }} organization: ${{ env.CHART_TARGET_ORG }} - name: Install chart-releaser @@ -169,6 +173,14 @@ jobs: --package-path .cr-release-packages \ --token ${{ secrets.GITHUB_TOKEN }} + - name: Ensure gh-pages branch exists + run: | + if ! git ls-remote --exit-code --heads origin gh-pages; then + git checkout --orphan gh-pages + git commit --allow-empty -m "Initialize gh-pages branch" + git push origin gh-pages + fi + - name: Generate updated index.yaml run: | cr index \ @@ -177,7 +189,7 @@ jobs: --index-path ${{ github.workspace }}/index.yaml \ --token ${{ secrets.GITHUB_TOKEN }} \ --push \ - --pages-branch 'gh-pages' \ + --pages-branch 'gh-pages' --remote origin \ --pages-index-path 'index.yaml' # Chart Release was never intended to publish to a different repo @@ -188,7 +200,7 @@ jobs: with: repository: ${{ env.CHART_TARGET_ORG }}/${{ env.CHART_TARGET_REPO }} path: ${{ env.CHART_TARGET_REPO }} - ref: ${{ env.CHART_TARGET_BRANCH }} + ref: gh-pages token: ${{ steps.get_workflow_token.outputs.token }} - name: Copy index.yaml diff --git a/.github/workflows/arc-publish.yaml b/.github/workflows/arc-publish.yaml index 37d67e9fe4..af376ed891 100644 --- a/.github/workflows/arc-publish.yaml +++ b/.github/workflows/arc-publish.yaml @@ -22,7 +22,7 @@ permissions: packages: write env: - TARGET_ORG: actions-runner-controller + TARGET_ORG: devzero-inc TARGET_REPO: actions-runner-controller concurrency: @@ -75,8 +75,8 @@ jobs: id: get_workflow_token uses: peter-murray/workflow-application-token-action@dc0413987a085fa17d19df9e47d4677cf81ffef3 with: - application_id: ${{ secrets.ACTIONS_ACCESS_APP_ID }} - application_private_key: ${{ secrets.ACTIONS_ACCESS_PK }} + application_id: ${{ secrets.WORKFLOW_ACTIONS_APP_ID }} + application_private_key: ${{ secrets.WORKFLOW_ACTIONS_PEM }} organization: ${{ env.TARGET_ORG }} - name: Resolve push to registries diff --git a/.github/workflows/arc-release-runners.yaml b/.github/workflows/arc-release-runners.yaml index 55ced30654..231a8dccc9 100644 --- a/.github/workflows/arc-release-runners.yaml +++ b/.github/workflows/arc-release-runners.yaml @@ -15,7 +15,7 @@ on: env: # Safeguard to prevent pushing images to registeries after build PUSH_TO_REGISTRIES: true - TARGET_ORG: actions-runner-controller + TARGET_ORG: devzero-inc TARGET_WORKFLOW: release-runners.yaml DOCKER_VERSION: 24.0.7 @@ -41,8 +41,8 @@ jobs: id: get_workflow_token uses: peter-murray/workflow-application-token-action@dc0413987a085fa17d19df9e47d4677cf81ffef3 with: - application_id: ${{ secrets.ACTIONS_ACCESS_APP_ID }} - application_private_key: ${{ secrets.ACTIONS_ACCESS_PK }} + application_id: ${{ secrets.WORKFLOW_ACTIONS_APP_ID }} + application_private_key: ${{ secrets.WORKFLOW_ACTIONS_PEM }} organization: ${{ env.TARGET_ORG }} - name: Trigger Build And Push Runner Images To Registries diff --git a/.github/workflows/gha-e2e-tests.yaml b/.github/workflows/gha-e2e-tests.yaml index 23562005a8..529786f7dc 100644 --- a/.github/workflows/gha-e2e-tests.yaml +++ b/.github/workflows/gha-e2e-tests.yaml @@ -13,7 +13,7 @@ permissions: contents: read env: - TARGET_ORG: actions-runner-controller + TARGET_ORG: devzero-inc TARGET_REPO: arc_e2e_test_dummy IMAGE_NAME: "arc-test-image" IMAGE_VERSION: "0.10.1" @@ -40,8 +40,8 @@ jobs: - uses: ./.github/actions/setup-arc-e2e id: setup with: - app-id: ${{secrets.E2E_TESTS_ACCESS_APP_ID}} - app-pk: ${{secrets.E2E_TESTS_ACCESS_PK}} + app-id: ${{ secrets.WORKFLOW_ACTIONS_APP_ID }} + app-pk: ${{ secrets.WORKFLOW_ACTIONS_PEM }} image-name: ${{env.IMAGE_NAME}} image-tag: ${{env.IMAGE_VERSION}} target-org: ${{env.TARGET_ORG}} @@ -131,8 +131,8 @@ jobs: - uses: ./.github/actions/setup-arc-e2e id: setup with: - app-id: ${{secrets.E2E_TESTS_ACCESS_APP_ID}} - app-pk: ${{secrets.E2E_TESTS_ACCESS_PK}} + app-id: ${{ secrets.WORKFLOW_ACTIONS_APP_ID }} + app-pk: ${{ secrets.WORKFLOW_ACTIONS_PEM }} image-name: ${{env.IMAGE_NAME}} image-tag: ${{env.IMAGE_VERSION}} target-org: ${{env.TARGET_ORG}} @@ -224,8 +224,8 @@ jobs: - uses: ./.github/actions/setup-arc-e2e id: setup with: - app-id: ${{secrets.E2E_TESTS_ACCESS_APP_ID}} - app-pk: ${{secrets.E2E_TESTS_ACCESS_PK}} + app-id: ${{ secrets.WORKFLOW_ACTIONS_APP_ID }} + app-pk: ${{ secrets.WORKFLOW_ACTIONS_PEM }} image-name: ${{env.IMAGE_NAME}} image-tag: ${{env.IMAGE_VERSION}} target-org: ${{env.TARGET_ORG}} @@ -316,8 +316,8 @@ jobs: - uses: ./.github/actions/setup-arc-e2e id: setup with: - app-id: ${{secrets.E2E_TESTS_ACCESS_APP_ID}} - app-pk: ${{secrets.E2E_TESTS_ACCESS_PK}} + app-id: ${{ secrets.WORKFLOW_ACTIONS_APP_ID }} + app-pk: ${{ secrets.WORKFLOW_ACTIONS_PEM }} image-name: ${{env.IMAGE_NAME}} image-tag: ${{env.IMAGE_VERSION}} target-org: ${{env.TARGET_ORG}} @@ -417,8 +417,8 @@ jobs: - uses: ./.github/actions/setup-arc-e2e id: setup with: - app-id: ${{secrets.E2E_TESTS_ACCESS_APP_ID}} - app-pk: ${{secrets.E2E_TESTS_ACCESS_PK}} + app-id: ${{ secrets.WORKFLOW_ACTIONS_APP_ID }} + app-pk: ${{ secrets.WORKFLOW_ACTIONS_PEM }} image-name: ${{env.IMAGE_NAME}} image-tag: ${{env.IMAGE_VERSION}} target-org: ${{env.TARGET_ORG}} @@ -520,8 +520,8 @@ jobs: - uses: ./.github/actions/setup-arc-e2e id: setup with: - app-id: ${{secrets.E2E_TESTS_ACCESS_APP_ID}} - app-pk: ${{secrets.E2E_TESTS_ACCESS_PK}} + app-id: ${{ secrets.WORKFLOW_ACTIONS_APP_ID }} + app-pk: ${{ secrets.WORKFLOW_ACTIONS_PEM }} image-name: ${{env.IMAGE_NAME}} image-tag: ${{env.IMAGE_VERSION}} target-org: ${{env.TARGET_ORG}} @@ -617,8 +617,8 @@ jobs: - uses: ./.github/actions/setup-arc-e2e id: setup with: - app-id: ${{secrets.E2E_TESTS_ACCESS_APP_ID}} - app-pk: ${{secrets.E2E_TESTS_ACCESS_PK}} + app-id: ${{ secrets.WORKFLOW_ACTIONS_APP_ID }} + app-pk: ${{ secrets.WORKFLOW_ACTIONS_PEM }} image-name: ${{env.IMAGE_NAME}} image-tag: ${{env.IMAGE_VERSION}} target-org: ${{env.TARGET_ORG}} @@ -739,8 +739,8 @@ jobs: - uses: ./.github/actions/setup-arc-e2e id: setup with: - app-id: ${{secrets.E2E_TESTS_ACCESS_APP_ID}} - app-pk: ${{secrets.E2E_TESTS_ACCESS_PK}} + app-id: ${{ secrets.WORKFLOW_ACTIONS_APP_ID }} + app-pk: ${{ secrets.WORKFLOW_ACTIONS_PEM }} image-name: ${{env.IMAGE_NAME}} image-tag: ${{env.IMAGE_VERSION}} target-org: ${{env.TARGET_ORG}} @@ -911,8 +911,8 @@ jobs: - uses: ./.github/actions/setup-arc-e2e id: setup with: - app-id: ${{secrets.E2E_TESTS_ACCESS_APP_ID}} - app-pk: ${{secrets.E2E_TESTS_ACCESS_PK}} + app-id: ${{ secrets.WORKFLOW_ACTIONS_APP_ID }} + app-pk: ${{ secrets.WORKFLOW_ACTIONS_PEM }} image-name: ${{env.IMAGE_NAME}} image-tag: ${{env.IMAGE_VERSION}} target-org: ${{env.TARGET_ORG}} diff --git a/.github/workflows/gha-publish-chart.yaml b/.github/workflows/gha-publish-chart.yaml index 251af8e8d1..8a3691f5e8 100644 --- a/.github/workflows/gha-publish-chart.yaml +++ b/.github/workflows/gha-publish-chart.yaml @@ -1,6 +1,10 @@ name: (gha) Publish Helm Charts on: + # test + pull_request: + branches: + - master workflow_dispatch: inputs: ref: diff --git a/.github/workflows/global-publish-canary.yaml b/.github/workflows/global-publish-canary.yaml index ba4796a9e7..bd84f4593b 100644 --- a/.github/workflows/global-publish-canary.yaml +++ b/.github/workflows/global-publish-canary.yaml @@ -51,7 +51,7 @@ jobs: runs-on: ubuntu-latest env: DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} - TARGET_ORG: actions-runner-controller + TARGET_ORG: devzero-inc TARGET_REPO: actions-runner-controller steps: - name: Checkout @@ -61,8 +61,8 @@ jobs: id: get_workflow_token uses: peter-murray/workflow-application-token-action@dc0413987a085fa17d19df9e47d4677cf81ffef3 with: - application_id: ${{ secrets.ACTIONS_ACCESS_APP_ID }} - application_private_key: ${{ secrets.ACTIONS_ACCESS_PK }} + application_id: ${{ secrets.WORKFLOW_ACTIONS_APP_ID }} + application_private_key: ${{ secrets.WORKFLOW_ACTIONS_PEM }} organization: ${{ env.TARGET_ORG }} - name: Trigger Build And Push Images To Registries