feat: update sdk version to v21.126 #18
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: Run fitgen Triggered by Comment | |
on: | |
issue_comment: | |
types: | |
- created | |
jobs: | |
run-fitgen: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: '${{ secrets.FIT }}' | |
- name: Check PR comment | |
id: check-comment | |
run: | | |
echo "trigger=${{ startsWith(github.event.comment.body, 'run fitgen') }}" >> $GITHUB_OUTPUT | |
if [[ "${{ github.event.comment.body }}" =~ ^run\ fitgen\ ([0-9]+\.[0-9]+)$ ]]; then | |
echo "sdkversion=${BASH_REMATCH[1]}" >> $GITHUB_OUTPUT | |
else | |
echo "comment syntax error" | |
exit 1 | |
fi | |
- name: Checkout PR | |
if: steps.check-comment.outputs.trigger == 'true' | |
env: | |
GITHUB_TOKEN: ${{ secrets.FIT }} | |
run: | | |
gh pr checkout ${{ github.event.issue.number }} | |
- name: Set up Go | |
if: steps.check-comment.outputs.trigger == 'true' | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ">=1.18" | |
- name: Run fitgen | |
if: steps.check-comment.outputs.trigger == 'true' | |
run: | | |
export wd=$(pwd) | |
echo $wd | |
cd internal/cmd/fitgen | |
go run main.go -f Profile.xlsx -p ../../../ -b all --sdk-version ${{ steps.check-comment.outputs.sdkversion }} --verbose -y | |
cd $wd | |
- name: Commit and Push | |
if: steps.check-comment.outputs.trigger == 'true' | |
env: | |
GITHUB_TOKEN: ${{ secrets.FIT }} | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Hikmatulloh Hari Mukti" | |
git add . | |
git commit -m "Generated files updated through Github Actions" | |
git push |