From 8f146e8437b2125f74ce9a31573d5359da2c019b Mon Sep 17 00:00:00 2001 From: Pierre Riteau Date: Wed, 9 Jul 2025 13:02:33 +0200 Subject: [PATCH] CI: Use GitHub token for Packer workflows Packer workflows sometimes fail due to rate limits of the GitHub API: Failed getting the "github.com/ethanmdavidson/git" plugin: 1 error occurred: * Plugin host rate limited the plugin getter. Try again in 3m52.820898337s. HINT: Set the PACKER_GITHUB_API_TOKEN env var with a token to get more requests. Set PACKER_GITHUB_API_TOKEN [1] to GITHUB_TOKEN [2] to reduce failures. [1] https://developer.hashicorp.com/packer/docs/configure#packer_github_api_token [2] https://docs.github.com/en/actions/concepts/security/github_token --- .github/workflows/extra.yml | 5 +++-- .github/workflows/fatimage.yml | 1 + .github/workflows/nightlybuild.yml | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/extra.yml b/.github/workflows/extra.yml index ed6f3e1b4..f18e380a5 100644 --- a/.github/workflows/extra.yml +++ b/.github/workflows/extra.yml @@ -43,6 +43,7 @@ jobs: OS_CLOUD: openstack CI_CLOUD: ${{ vars.CI_CLOUD }} # default from repo settings ARK_PASSWORD: ${{ secrets.ARK_PASSWORD }} + PACKER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@v2 @@ -95,7 +96,7 @@ jobs: . environments/.stackhpc/activate cd packer/ packer init . - + PACKER_LOG=1 packer build \ -on-error=${{ vars.PACKER_ON_ERROR }} \ -var-file=$PKR_VAR_environment_root/${{ env.CI_CLOUD }}.pkrvars.hcl \ @@ -104,7 +105,7 @@ jobs: -var "inventory_groups=${{ matrix.build.inventory_groups }}" \ -var "volume_size=${{ matrix.build.volume_size }}" \ openstack.pkr.hcl - + - name: Get created image names from manifest id: manifest run: | diff --git a/.github/workflows/fatimage.yml b/.github/workflows/fatimage.yml index 8b5eebfc8..5bb0fde9a 100644 --- a/.github/workflows/fatimage.yml +++ b/.github/workflows/fatimage.yml @@ -39,6 +39,7 @@ jobs: CI_CLOUD: ${{ github.event.inputs.ci_cloud }} ARK_PASSWORD: ${{ secrets.ARK_PASSWORD }} LEAFCLOUD_PULP_PASSWORD: ${{ secrets.LEAFCLOUD_PULP_PASSWORD }} + PACKER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/nightlybuild.yml b/.github/workflows/nightlybuild.yml index f0d4b941f..ea4b2423f 100644 --- a/.github/workflows/nightlybuild.yml +++ b/.github/workflows/nightlybuild.yml @@ -36,6 +36,7 @@ jobs: CI_CLOUD: ${{ github.event.inputs.ci_cloud || vars.CI_CLOUD }} ARK_PASSWORD: ${{ secrets.ARK_PASSWORD }} LEAFCLOUD_PULP_PASSWORD: ${{ secrets.LEAFCLOUD_PULP_PASSWORD }} + PACKER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@v2