Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

upkeep: use the new refactored workflows #30

Merged
merged 1 commit into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 0 additions & 64 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: prometheus
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: mimir
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:
promotion: ${{ github.event.inputs.promotion }}
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ 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
11 changes: 0 additions & 11 deletions .github/workflows/release-edge.yaml

This file was deleted.

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

This file was deleted.

11 changes: 11 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
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
2 changes: 1 addition & 1 deletion .github/workflows/update-libs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ 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