Skip to content

Commit

Permalink
Switch to main release workflow (#38)
Browse files Browse the repository at this point in the history
* Switch to main release workflow

* use all the refactored ci workflows

---------

Co-authored-by: Luca Bello <[email protected]>
  • Loading branch information
simskij and lucabello authored Sep 19, 2023
1 parent 63894bc commit f237e8f
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 140 deletions.
65 changes: 0 additions & 65 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

50 changes: 4 additions & 46 deletions .github/workflows/issues.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,49 +5,7 @@ on: [issues]
jobs:
update:
name: Update Issue
runs-on: ubuntu-latest
steps:
- name: Dump Github Context
run: |
echo "update=false" >> $GITHUB_ENV
if [ ${{ github.event_name }} != "issues" ]; then
echo "This action only operates on issues"
exit 0
fi
echo "update=true" >> $GITHUB_ENV
- name: Determine action
run: |
if [ ${{ github.event.action }} == "opened" ]; then
echo "action=open" >> $GITHUB_ENV
fi
if [ ${{ github.event.action }} == "reopened" ]; then
echo "action=reopen" >> $GITHUB_ENV
fi
if [ ${{ github.event.action }} == "closed" ]; then
echo "action=close" >> $GITHUB_ENV
fi
- name: Determine type
run: |
if ${{ contains(github.event.*.labels.*.name, 'Type: Bug') }}; then
echo "type=bug" >> $GITHUB_ENV
else
echo "type=story" >> $GITHUB_ENV
fi
- name: Update
if: ${{ env.update == 'true' }}
env:
ID: ${{ github.event.issue.html_url }}
TITLE: ${{github.event.issue.title }}
COMPONENT: catalogue
DESCRIPTION: Opened by ${{ github.event.issue.user.login }}.
run: |
data=$(jq -n \
--arg id "$ID" \
--arg action "${{ env.action }}" \
--arg title "$TITLE" \
--arg description "$DESCRIPTION" \
--arg component "$COMPONENT" \
--arg type "${{ env.type }}" \
'{data: {id: $id, action: $action, title: $title, description: $description, component: $component, type: $type}}')
curl -X POST -H 'Content-type: application/json' --data "${data}" "${{ secrets.JIRA_URL }}"
uses: canonical/observability/.github/workflows/issues.yaml@main
secrets: inherit
with:
component: catalogue
2 changes: 1 addition & 1 deletion .github/workflows/promote.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
jobs:
promote:
name: Promote
uses: canonical/observability/.github/workflows/promote-charm.yaml@main
uses: canonical/observability/.github/workflows/charm-promote.yaml@main
with:
charm-path: "charm"
promotion: ${{ github.event.inputs.promotion }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
pull-request:
name: PR
uses: canonical/observability/.github/workflows/pull-request.yaml@main
uses: canonical/observability/.github/workflows/charm-pull-request.yaml@main
secrets: inherit
with:
charm-path: "charm"
13 changes: 0 additions & 13 deletions .github/workflows/release-edge.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions .github/workflows/release-libs.yaml

This file was deleted.

13 changes: 13 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Release Charm to Edge and Publish Libraries

on:
push:
branches:
- main

jobs:
release:
uses: canonical/observability/.github/workflows/charm-release.yaml@main
secrets: inherit
with:
charm-path: "charm"
2 changes: 1 addition & 1 deletion .github/workflows/update-libs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
update-lib:
name: Check libraries
uses: canonical/observability/.github/workflows/update-libs.yaml@main
uses: canonical/observability/.github/workflows/charm-update-libs.yaml@main
secrets: inherit
with:
charm-path: "charm"
Expand Down

0 comments on commit f237e8f

Please sign in to comment.