Merge pull request #134 from nebius/release/soperator #24
This file contains 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
name: "Build soperator terraform release" | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "soperator/**" | |
- ".github/workflows/soperator.yml" | |
permissions: | |
contents: read | |
jobs: | |
build: | |
permissions: | |
contents: write # for softprops/action-gh-release to create GitHub release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | |
with: | |
egress-policy: audit | |
- name: Checkout repository | |
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 | |
- name: Build release | |
run: | | |
cd soperator | |
make release | |
ls -la releases/ | |
- name: Get Version | |
id: get_version | |
run: | | |
VERSION=$(cat soperator/VERSION) | |
SUBVERSION=$(cat soperator/SUBVERSION) | |
echo "TAG_VERSION=v$VERSION-$SUBVERSION" >> $GITHUB_ENV | |
- name: Create GitHub Release and Upload terraform tarball | |
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: soperator-${{ env.TAG_VERSION }} | |
name: Soperator Terraform recipe ${{ env.TAG_VERSION }} | |
draft: false | |
prerelease: false | |
files: | | |
soperator/releases/soperator-tf-*.tar.gz | |
- name: Cleanup | |
run: rm -rf soperator/releases |