Skip to content

auto build sealer ClusterImage using github action #82

auto build sealer ClusterImage using github action

auto build sealer ClusterImage using github action #82

Workflow file for this run

name: Auto build image
on:
issue_comment:
types:
- created
jobs:
issue_comment:
name: Auto build image
if: startswith(github.event.comment.body, '/imagebuild')
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Auto build image
id: autobuild
run: |
commentbody="${{github.event.comment.body}}"
commentbody=$(echo $commentbody | sed "s/\/imagebuild//g")
sudo git clone https://github.com/sealerio/basefs.git && cd basefs
sudo touch autobuild.log && sudo chmod 666 autobuild.log && sudo bash auto-build.sh --username="${{secrets.REGISTRY_USERNAME}}" --password="${{secrets.REGISTRY_PASSWORD}}" $commentbody > autobuild.log && cat autobuild.log
echo "::set-output name=info::$(grep 'cri:' autobuild.log))"
- name: Success Commit
uses: peter-evans/create-or-update-comment@v1
with:
issue-number: ${{ github.event.issue.number }}
body: |
${{ steps.autobuild.outputs.info }}