Skip to content

Issue comment

Issue comment #20

Workflow file for this run

name: commands
run-name: Issue comment
on:
issue_comment:
types:
- created
- edited
jobs:
rebuild:
if: ${{ contains(github.event.comment.body, '/rebuild') }}
runs-on: ${{ matrix.builder }}
strategy:
matrix:
include:
- builder: ubuntu-latest
platform: linux/amd64
steps:
- uses: actions-ecosystem/action-regex-match@v2
with:
text: ${{ github.event.comment.body }}
regex: '^/rebuild(\+[a-z]*)?\s*([\w\.]+)$'
id: regex
- uses: actions/checkout@v4
- uses: ./.github/actions/rebuild
with:
tag: ${{ steps.regex.outputs.group2 }}
publish: ${{ steps.regex.outputs.group1 == '+publish' }}
release: latest/stable
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
- run: gh issue comment "${{ github.event.issue.number }}" --body "${{ steps.regex.outputs.group1 }} rebuild completed successfully"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
- run: gh issue comment "${{ github.event.issue.number }}" --body "${{ steps.regex.outputs.group1 }} was published on snapcraft.io"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
if: ${{ steps.regex.outputs.group1 == '+publish' }}