Skip to content

Instance: Test ansible exosphere scripts update #374

Instance: Test ansible exosphere scripts update

Instance: Test ansible exosphere scripts update #374

Workflow file for this run

name: Update Issue
on:
issue_comment:
types: [created]
# Permissions needed for reacting to IssueOps commands on issues
permissions:
issues: write
checks: read
jobs:
update-issue:
runs-on: ubuntu-latest
if:
${{ !github.event.issue.pull_request && (
contains(github.event.comment.body, '/encode_email') ||
contains(github.event.comment.body, '/decode_email') ) }}
steps:
- name: encode_email command
id: encode_email_command
uses: github/[email protected]
with:
command: "/encode_email"
reaction: "rocket"
allowed_contexts: "issue"
permissions: "read,triage,write,maintain,admin"
allowlist:
"${{ vars.MORPHOCLOUD_GITHUB_ADMINS }},${{
github.event.issue.user.login }}"
- name: decode_email command
id: decode_email_command
uses: github/[email protected]
with:
command: "/decode_email"
reaction: "rocket"
allowed_contexts: "issue"
permissions: "read,triage,write,maintain,admin"
allowlist:
"${{ vars.MORPHOCLOUD_GITHUB_ADMINS }},${{
github.event.issue.user.login }}"
- name: Set command metadata
id: command
if:
${{ steps.encode_email_command.outputs.continue == 'true' ||
steps.decode_email_command.outputs.continue == 'true' }}
run: |
if [[ "$ENCODE_EMAIL_COMMAND_CONTINUE" == "true" ]]; then
continue="$ENCODE_EMAIL_COMMAND_CONTINUE"
command_name="encode_email"
comment_id="${{ steps.encode_email_command.outputs.comment_id }}"
elif [[ "$DECODE_EMAIL_COMMAND_CONTINUE" == "true" ]]; then
continue="$DECODE_EMAIL_COMMAND_CONTINUE"
command_name="decode_email"
comment_id="${{ steps.decode_email_command.outputs.comment_id }}"
else
continue="false"
command_name=""
comment_id=""
fi
echo "continue=$continue" >> $GITHUB_OUTPUT
echo "command_name=$command_name" >> $GITHUB_OUTPUT
echo "comment_id=$comment_id" >> $GITHUB_OUTPUT
env:
ENCODE_EMAIL_COMMAND_CONTINUE:
${{ steps.encode_email_command.outputs.continue }}
DECODE_EMAIL_COMMAND_CONTINUE:
${{ steps.decode_email_command.outputs.continue }}
- uses: actions/checkout@v4
- name: Update issue description
if: ${{ steps.command.outputs.continue == 'true' }}
uses: ./.github/actions/update-issue-description
with:
issue_number: ${{ github.event.issue.number }}
command_name: ${{ steps.command.outputs.command_name }}
token: ${{ secrets.GITHUB_TOKEN }}
string_encryption_key: ${{ secrets.STRING_ENCRYPTION_KEY }}