From 5aff024338a0b54c05e9d32477d0346c6b6d12af Mon Sep 17 00:00:00 2001 From: Maksim Svetlakov Date: Tue, 1 Dec 2026 14:23:18 -0500 Subject: [PATCH 1/3] ci: push the release with the elastio-release App token (elastio/blue-stack#18441) --- .github/workflows/release.yml | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f534604..b57aaea 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -47,21 +47,32 @@ jobs: # Publishing happens only on pushes to master. Other branches and PRs don't count if: ${{ github.ref == 'refs/heads/master' }} runs-on: ubuntu-latest + # The key of the elastio-release App is in this environment, for master only. + environment: release # This job must execute only if all checks pass! needs: - rust-lint env: + ELASTIO_GIT_COMMIT_AUTHOR_NAME: elastio-release[bot] + ELASTIO_GIT_COMMIT_AUTHOR_EMAIL: 363618334+elastio-release[bot]@users.noreply.github.com CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_TOKEN }} steps: - # NASTY: This token must be the PAT of a user who has admin access to the repo - # in order to bypass branch protections and commit directly to master. + # The release commit and tag are pushed with the token that checkout stores. + - name: Mint the token of the elastio-release App + id: app + uses: actions/create-github-app-token@f418cff399f7aef4c2f0ad47e25ca7a6abbdd6fc # v3.4.0 + with: + app-id: ${{ vars.ELASTIO_RELEASE_APP_ID }} + private-key: ${{ secrets.ELASTIO_RELEASE_PRIVATE_KEY }} + permission-contents: write + - uses: actions/checkout@v3 with: submodules: recursive - token: ${{ secrets.TSAR_FERRIS_GITHUB_TOKEN }} + token: ${{ steps.app.outputs.token }} - uses: actions-rs/toolchain@v1 with: @@ -73,8 +84,8 @@ jobs: # A committer identity is required in order to commit things - run: | - git config user.name "Tsar Ferris" - git config user.email tsar-ferris@elastio.com + git config user.name "elastio-release[bot]" + git config user.email "363618334+elastio-release[bot]@users.noreply.github.com" - run: git config --global credential.helper store && echo https://token:${{ secrets.PRIVATE_REGISTRY_TOKEN }}@dl.cloudsmith.io > $HOME/.git-credentials From cda2a4f286812fb72d51a912387b9b2a9ec38424 Mon Sep 17 00:00:00 2001 From: Maksim Svetlakov Date: Tue, 1 Dec 2026 14:32:46 -0500 Subject: [PATCH 2/3] ci: replace end-of-life actions in the CI and release workflows --- .github/workflows/ci.yml | 12 +++++------- .github/workflows/release.yml | 15 +++++++-------- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a856786..e778b3a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,7 @@ jobs: continue-on-error: ${{ matrix.checks == 'advisories' }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: submodules: recursive - name: Read rust-toolchain file @@ -66,7 +66,7 @@ jobs: os: [macos-latest, ubuntu-latest] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: submodules: recursive - name: Read rust-toolchain file @@ -107,7 +107,7 @@ jobs: os: [ubuntu-latest] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: submodules: recursive - name: Read rust-toolchain file @@ -139,12 +139,10 @@ jobs: RUSTC_BOOTSTRAP: 1 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: submodules: recursive - - uses: actions-rs/toolchain@v1 - with: - profile: minimal + - uses: elastio/actions/rust-toolchain@v1 - run: git config --global credential.helper store && echo https://token:${{ secrets.PRIVATE_REGISTRY_TOKEN }}@dl.cloudsmith.io > $HOME/.git-credentials - run: sudo apt-get install -y linux-headers-$(uname -r) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b57aaea..1b417be 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,12 +28,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: submodules: recursive - - uses: actions-rs/toolchain@v1 + - uses: elastio/actions/rust-toolchain@v1 with: - profile: minimal components: rustfmt, clippy - run: git config --global credential.helper store && echo https://token:${{ secrets.PRIVATE_REGISTRY_TOKEN }}@dl.cloudsmith.io > $HOME/.git-credentials @@ -69,17 +68,17 @@ jobs: private-key: ${{ secrets.ELASTIO_RELEASE_PRIVATE_KEY }} permission-contents: write - - uses: actions/checkout@v3 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: submodules: recursive token: ${{ steps.app.outputs.token }} - - uses: actions-rs/toolchain@v1 - with: - profile: minimal + - uses: elastio/actions/rust-toolchain@v1 # Install cloudsmith CLI via pip - - uses: actions/setup-python@v4 + - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6 + with: + python-version: "3.12" - run: pip install cloudsmith-cli # A committer identity is required in order to commit things From e999cc35bca52429eb33718fb483e06332804138 Mon Sep 17 00:00:00 2001 From: Maksim Svetlakov Date: Tue, 1 Dec 2026 14:48:44 -0500 Subject: [PATCH 3/3] ci: use public actions, the repo is public and can not use elastio/actions --- .github/workflows/ci.yml | 13 +++++++++---- .github/workflows/release.yml | 20 +++++++++++++++----- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e778b3a..20f3f09 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,7 @@ jobs: run: | echo "RUST_TOOLCHAIN=$(cat rust-toolchain)" >> $GITHUB_ENV - - uses: elastio/actions/rust-toolchain@v1 + - uses: dtolnay/rust-toolchain@df2a88e9fe4098bad09cb42c3dec7187f15861fc # master with: toolchain: ${{ env.RUST_TOOLCHAIN }} components: rustfmt, clippy @@ -74,7 +74,7 @@ jobs: run: | echo "RUST_TOOLCHAIN=$(cat rust-toolchain)" >> $GITHUB_ENV - - uses: elastio/actions/rust-toolchain@v1 + - uses: dtolnay/rust-toolchain@df2a88e9fe4098bad09cb42c3dec7187f15861fc # master with: toolchain: ${{ env.RUST_TOOLCHAIN }} components: rustfmt, clippy @@ -115,7 +115,7 @@ jobs: run: | echo "RUST_TOOLCHAIN=$(cat rust-toolchain)" >> $GITHUB_ENV - - uses: elastio/actions/rust-toolchain@v1 + - uses: dtolnay/rust-toolchain@df2a88e9fe4098bad09cb42c3dec7187f15861fc # master with: toolchain: ${{ env.RUST_TOOLCHAIN }} components: rustfmt, clippy @@ -142,7 +142,12 @@ jobs: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: submodules: recursive - - uses: elastio/actions/rust-toolchain@v1 + # The repo is public and can not use the private elastio/actions. + - id: toolchain + run: echo "version=$(cat rust-toolchain)" >> "$GITHUB_OUTPUT" + - uses: dtolnay/rust-toolchain@df2a88e9fe4098bad09cb42c3dec7187f15861fc # master + with: + toolchain: ${{ steps.toolchain.outputs.version }} - run: git config --global credential.helper store && echo https://token:${{ secrets.PRIVATE_REGISTRY_TOKEN }}@dl.cloudsmith.io > $HOME/.git-credentials - run: sudo apt-get install -y linux-headers-$(uname -r) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1b417be..d539e78 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,8 +31,12 @@ jobs: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: submodules: recursive - - uses: elastio/actions/rust-toolchain@v1 + # The repo is public and can not use the private elastio/actions. + - id: toolchain + run: echo "version=$(cat rust-toolchain)" >> "$GITHUB_OUTPUT" + - uses: dtolnay/rust-toolchain@df2a88e9fe4098bad09cb42c3dec7187f15861fc # master with: + toolchain: ${{ steps.toolchain.outputs.version }} components: rustfmt, clippy - run: git config --global credential.helper store && echo https://token:${{ secrets.PRIVATE_REGISTRY_TOKEN }}@dl.cloudsmith.io > $HOME/.git-credentials @@ -73,7 +77,12 @@ jobs: submodules: recursive token: ${{ steps.app.outputs.token }} - - uses: elastio/actions/rust-toolchain@v1 + # The repo is public and can not use the private elastio/actions. + - id: toolchain + run: echo "version=$(cat rust-toolchain)" >> "$GITHUB_OUTPUT" + - uses: dtolnay/rust-toolchain@df2a88e9fe4098bad09cb42c3dec7187f15861fc # master + with: + toolchain: ${{ steps.toolchain.outputs.version }} # Install cloudsmith CLI via pip - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6 @@ -89,9 +98,10 @@ jobs: - run: git config --global credential.helper store && echo https://token:${{ secrets.PRIVATE_REGISTRY_TOKEN }}@dl.cloudsmith.io > $HOME/.git-credentials - name: Install xelastio - uses: elastio/actions/install@v1 - with: - tool: xelastio + run: | + curl --location --silent --fail --show-error --retry 5 \ + https://dl.cloudsmith.io/public/elastio/public/raw/versions/latest/cargo-xelastio_x86_64-unknown-linux-musl.tar.xz \ + | tar --extract --xz --directory "$HOME/.cargo/bin" # Perform the actual release operations - run: cargo xelastio publish release ${{ github.event.inputs.bumpLevel }}