-
Notifications
You must be signed in to change notification settings - Fork 50
77 lines (67 loc) · 2.6 KB
/
release-bundle-to-charmhub.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Publish bundle to Charmhub
on:
push:
branches:
- main
paths:
- releases/**
# only for testing purposes
pull_request:
paths:
- releases/**
jobs:
get-releases-affected:
name: Get releases affected
runs-on: ubuntu-22.04
outputs:
releases_affected: ${{ steps.get-releases-affected.outputs.releases_affected_json }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get files changed
id: changed-files
uses: tj-actions/changed-files@v37
- name: Get releases affected
id: get-releases-affected
run: python scripts/get_releases_affected.py ${{ steps.changed-files.outputs.all_changed_files }}
output-json:
name: output fromJson
runs-on: ubuntu-22.04
steps:
- name: output
run: echo ${{ fromJson(needs.get-releases-affected.outputs.releases_affected) }}
run-tests-and-publish-bundle-for-releases-affected:
name: Run bundle tests for releases affected and publish bundle to corresponding Charmhub channels
uses: ./.github/workflows/run-tests-and-publish-bundle.yaml
needs: [get-releases-affected]
strategy:
fail-fast: false
matrix:
release: ${{ fromJson(needs.get-releases-affected.outputs.releases_affected) }}
with:
release: ${{ matrix.release }}
# runs-on: ubuntu-22.04
# steps:
# - uses: actions/checkout@v3
# - name: Get bundle path for current release
# id: bundle-path
# run: python scripts/get_bundle_path.py ${{ matrix.release }}
# - name: Get bundle test path for current release
# id: bundle-tests-path
# run: python scripts/get_bundle_test_path.py ${{ matrix.release }}
# - name: Run tests for bundle release ${{ matrix.release }}
# uses: ./.github/actions/full-bundle-tests
# with:
# bundle-test-path: ${{ steps.bundle-test-path.outputs.bundle_test_path }}
# bundle-source: --file ${{ steps.bundle-path.outputs.bundle_path }}/bundle.yaml
# dockerhub-user: ${{ secrets.MAKSIM_DOCKERHUB_PASSWORD }}
# dockerhub-password: ${{ secrets.MAKSIM_DOCKERHUB_PASSWORD }}
# github-token: ${{ secrets.GITHUB_TOKEN}}
# - name: Publish bundle for release ${{ matrix.release }} to Charmhub
# uses: canonical/charming-actions/upload-bundle@1.0.0
# with:
# credentials: ${{ secrets.CHARMCRAFT_CREDENTIALS }}
# github-token: ${{ secrets.GITHUB_TOKEN }}
# bundle-path: ${{ steps.bundle-path.outputs.bundle_path }}
# channel: ${{ matrix.release }}/test-branch