2.18.0 #74
Workflow file for this run
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: Jira release creator | |
on: | |
release: | |
types: [published] | |
jobs: | |
create-ticket: | |
runs-on: ubuntu-22.04 | |
name: Create a CCB ticket in Jira | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
coverage: none | |
- name: Install dependencies | |
run: composer install --optimize-autoloader --no-interaction | |
- name: Generate Jira ticket body | |
env: | |
GITHUB_ACTIONS_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
RELEASE_BODY: ${{ github.event.release.body }} | |
JIRA_BASE_URL: ${{ vars.JIRA_BASE_URL }} | |
run: | | |
${GITHUB_WORKSPACE}/.github/workflows/create-ccb-ticket.sh "$RELEASE_BODY" "${{ github.event.release.name }}" "${{ github.event.release.html_url }}" "$GITHUB_ACTIONS_RUN_URL" "$JIRA_BASE_URL" >> jira_description.md | |
JIRA_DESCRIPTION=$(<jira_description.md) | |
echo "JIRA_DESCRIPTION<<EOF" >> $GITHUB_ENV | |
echo "$JIRA_DESCRIPTION" >> $GITHUB_ENV | |
echo "EOF" >> $GITHUB_ENV | |
shell: bash | |
- name: Login to Jira | |
uses: atlassian/gajira-login@v3 | |
env: | |
JIRA_BASE_URL: ${{ vars.JIRA_BASE_URL }} | |
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }} | |
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }} | |
- name: Create CCB ticket in Jira | |
id: create | |
uses: atlassian/gajira-create@v3 | |
with: | |
project: CLI | |
issuetype: Release | |
summary: "${{ env.FIX_VERSION }}" | |
description: "${{ env.JIRA_DESCRIPTION }}" | |
fields: '{"components": [{"id": "25474"}], "labels": ["ccb_std_017"], "customfield_10004": {"id": "15710"}, "fixVersions": [{"name": "${{ env.FIX_VERSION }}"}]}' | |
env: | |
FIX_VERSION: Acquia CLI ${{ github.event.release.name }} | |
- name: Log created issue | |
run: echo "Issue ${{ steps.create.outputs.issue }} was created" |