diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index aa383dcaf..d9ac8e5a4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -140,11 +140,14 @@ jobs: USE_CHAINGUARD: "1" UPLOAD_BINARIES: "1" SKIP_RELEASE: "1" + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | export K0S_VERSION=$(make print-K0S_VERSION) export EC_VERSION=$(git describe --tags --match='[0-9]*.[0-9]*.[0-9]*') export SHORT_SHA=dev-${{ needs.git-sha.outputs.git_sha }} export APP_VERSION=appver-dev-${{ needs.git-sha.outputs.git_sha }} + # avoid rate limiting + export FIO_VERSION=$(gh release list --repo axboe/fio --json tagName,isLatest | jq -r '.[] | select(.isLatest==true)|.tagName' | cut -d- -f2) ./scripts/build-and-release.sh @@ -209,10 +212,13 @@ jobs: UPLOAD_BINARIES: "1" SKIP_RELEASE: "1" MANGLE_METADATA: "1" + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | export K0S_VERSION=$(make print-PREVIOUS_K0S_VERSION) export EC_VERSION=$(git describe --tags --match='[0-9]*.[0-9]*.[0-9]*')-previous-k0s export APP_VERSION=appver-dev-${{ needs.git-sha.outputs.git_sha }}-previous-k0s + # avoid rate limiting + export FIO_VERSION=$(gh release list --repo axboe/fio --json tagName,isLatest | jq -r '.[] | select(.isLatest==true)|.tagName' | cut -d- -f2) ./scripts/build-and-release.sh @@ -275,10 +281,13 @@ jobs: UPLOAD_BINARIES: "1" SKIP_RELEASE: "1" MANGLE_METADATA: "1" + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | export K0S_VERSION=$(make print-K0S_VERSION) export EC_VERSION=$(git describe --tags --match='[0-9]*.[0-9]*.[0-9]*')-upgrade export APP_VERSION=appver-dev-${{ needs.git-sha.outputs.git_sha }}-upgrade + # avoid rate limiting + export FIO_VERSION=$(gh release list --repo axboe/fio --json tagName,isLatest | jq -r '.[] | select(.isLatest==true)|.tagName' | cut -d- -f2) ./scripts/build-and-release.sh @@ -365,12 +374,10 @@ jobs: with: fetch-depth: 0 - name: Install replicated CLI + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - curl --retry 5 --retry-all-errors -fs https://api.github.com/repos/replicatedhq/replicated/releases/latest \ - | grep "browser_download_url.*linux_amd64.tar.gz" \ - | cut -d : -f 2,3 \ - | tr -d \" \ - | wget -O replicated.tar.gz -qi - + gh release download --repo replicatedhq/replicated --pattern '*linux_amd64.tar.gz' --output replicated.tar.gz tar xf replicated.tar.gz replicated && rm replicated.tar.gz mv replicated /usr/local/bin/replicated - name: Create CI releases diff --git a/.github/workflows/dependencies.yaml b/.github/workflows/dependencies.yaml index db2e88511..4d8dd7188 100644 --- a/.github/workflows/dependencies.yaml +++ b/.github/workflows/dependencies.yaml @@ -21,18 +21,22 @@ jobs: export VERSION=`curl -L -s https://dl.k8s.io/release/stable.txt` sed -i "/^KUBECTL_VERSION/c\KUBECTL_VERSION = $VERSION" Makefile - name: K0s + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | # Remove the '-ec.X' suffix and only update if the prefix (upstream k0s release) has changed. export CURVERSION=$(make print-K0S_VERSION) - export VERSION=`curl https://api.github.com/repos/k0sproject/k0s/releases/latest | jq -r .name` + export VERSION=$(gh release list --repo k0sproject/k0s --json name,isLatest | jq -r '.[] | select(.isLatest)|.name') if [ "$CURVERSION" != "$VERSION" ]; then sed -i "/^K0S_VERSION/c\K0S_VERSION = $VERSION" Makefile sed -i "/^K0S_BINARY_SOURCE_OVERRIDE/c\K0S_BINARY_SOURCE_OVERRIDE =" Makefile make go.mod fi - name: Troubleshoot + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - export VERSION=`curl https://api.github.com/repos/replicatedhq/troubleshoot/releases/latest | jq -r .name` + export VERSION=$(gh release list --repo replicatedhq/troubleshoot --json name,isLatest | jq -r '.[] | select(.isLatest)|.name') sed -i "/^TROUBLESHOOT_VERSION/c\TROUBLESHOOT_VERSION = $VERSION" Makefile - name: Create Pull Request uses: peter-evans/create-pull-request@v7