@@ -2,7 +2,7 @@ name: run-ci-jobs
22
33on :
44 push :
5- branches : ["main", "flit" ]
5+ branches : ["main"]
66
77jobs :
88 get_tag :
@@ -19,97 +19,115 @@ jobs:
1919 id : tag_version
2020 with :
2121 github_token : ${{ secrets.GITHUB_TOKEN }}
22- release_branches : main,flit
22+ release_branches : main
2323 create_annotated_tag : false
2424 fetch_all_tags : true
2525
26- generate_flit_content :
26+ generate_workflow_content :
2727 runs-on : ubuntu-latest
2828 needs : get_tag
2929 if : |
3030 always() &&
3131 (needs.get_tag.result == 'success') &&
32- (github.ref_name == 'flit ') &&
32+ (github.ref_name == 'main ') &&
3333 (github.ref_type == 'branch')
3434 steps :
3535 - name : Checkout Repository for Local Action
3636 uses : actions/checkout@v3
3737
38- - name : Generate Content from 'flit ' Template
38+ - name : Generate Content from 'workflow ' Template
3939 id : bake-cookies
4040 uses : ./.github/actions/bake-cookies
4141 with :
4242 github_token : ${{ secrets.GITHUB_TOKEN }}
43- folder : o-science-institute_w-neuro-lab
44- cookiecutter_pkg : git+https://github.com/cookiecutter/cookiecutter
45- cookiecutter_args : -f --no-input
43+ folder : workflow_name
44+ cookiecutter_args : -f --no-input --directory workflow
4645 new_tag : ${{ needs.get_tag.outputs.new_tag }}
46+ outputs :
47+ artifact : ${{ steps.bake-cookies.outputs.artifact }}
4748
48- generate_workflow_content :
49+ generate_flit_content :
4950 runs-on : ubuntu-latest
50- needs : [get_tag]
51+ needs : [get_tag, generate_workflow_content ]
5152 if : |
5253 always() &&
5354 (needs.get_tag.result == 'success') &&
55+ (needs.generate_workflow_content.result == 'success') &&
5456 (github.ref_name == 'main') &&
5557 (github.ref_type == 'branch')
5658 steps :
5759 - name : Checkout Repository for Local Action
5860 uses : actions/checkout@v3
5961
60- - name : Generate Content from 'workflow ' Template
62+ - name : Generate Content from 'flit ' Template
6163 id : bake-cookies
6264 uses : ./.github/actions/bake-cookies
6365 with :
6466 github_token : ${{ secrets.GITHUB_TOKEN }}
65- folder : workflow_name
66- cookiecutter_args : -f --no-input --directory workflow
67+ folder : o-science-institute_w-neuro-lab
68+ cookiecutter_pkg : git+https://github.com/cookiecutter/cookiecutter
69+ cookiecutter_args : -f --no-input --directory flit
6770 new_tag : ${{ needs.get_tag.outputs.new_tag }}
71+ outputs :
72+ artifact : ${{ steps.bake-cookies.outputs.artifact }}
6873
6974 generate_element_content :
7075 runs-on : ubuntu-latest
71- needs : [get_tag, generate_workflow_content ]
76+ needs : [get_tag, generate_flit_content ]
7277 if : |
7378 always() &&
7479 (needs.get_tag.result == 'success') &&
75- (needs.generate_workflow_content .result == 'success') &&
80+ (needs.generate_flit_content .result == 'success') &&
7681 (github.ref_name == 'main') &&
7782 (github.ref_type == 'branch')
7883 steps :
7984 - run : echo "Element template not yet available"
80- # - name: Checkout Repository for Local Action
81- # uses: actions/checkout@v3
85+ # - name: Checkout Repository for Local Action
86+ # uses: actions/checkout@v3
8287
83- # - name: Generate Content from 'element' Template
84- # id: bake-cookies
85- # uses: ./.github/actions/bake-cookies
86- # with:
87- # github_token: ${{ secrets.GITHUB_TOKEN }}
88- # folder: element_name
89- # cookiecutter_args: -f --no-input --directory element
90- # new_tag: ${{ needs.get_tag.outputs.new_tag }}
88+ # - name: Generate Content from 'element' Template
89+ # id: bake-cookies
90+ # uses: ./.github/actions/bake-cookies
91+ # with:
92+ # github_token: ${{ secrets.GITHUB_TOKEN }}
93+ # folder: element_name
94+ # cookiecutter_args: -f --no-input --directory element
95+ # new_tag: ${{ needs.get_tag.outputs.new_tag }}
96+ # outputs:
97+ # artifact: ${{ steps.bake-cookies.outputs.artifact }}
9198
9299 make_release :
93100 runs-on : ubuntu-latest
94- needs : [get_tag, generate_flit_content, generate_element_content]
101+ needs :
102+ [
103+ get_tag,
104+ generate_flit_content,
105+ generate_workflow_content,
106+ generate_element_content,
107+ ]
95108 if : |
96109 always() &&
97110 (needs.get_tag.result == 'success') &&
98- (
99- needs.generate_flit_content.result == 'success' ||
100- needs.generate_element_content.result == 'success'
101- )
111+ (needs.generate_element_content.result == 'success')
102112 steps :
103113 - name : Checkout Repository
104114 uses : actions/checkout@v3
105115
106- - name : Downloading Artifact Content
116+ - name : Downloading 'flit' Artifact Content
117+ uses : actions/download-artifact@v3
118+ with :
119+ name : ${{ needs.generate_flit_content.outputs.artifact }}
120+ path : ${{ needs.generate_flit_content.outputs.artifact }}
121+
122+ - name : Downloading 'workflow' Artifact Content
107123 uses : actions/download-artifact@v3
108124 with :
109- name : cookiecutter_content_ ${{ needs.get_tag .outputs.new_tag }}
110- path : cookiecutter_content
125+ name : ${{ needs.generate_workflow_content .outputs.artifact }}
126+ path : ${{ needs.generate_workflow_content.outputs.artifact }}
111127
112- - run : tar -zcf cookiecutter_content_${{ github.ref_name }}_${{ needs.get_tag.outputs.new_tag }}.tar.gz cookiecutter_content
128+ - run : |
129+ tar -zcf ${{ needs.generate_flit_content.outputs.artifact }}.tar.gz ${{ needs.generate_flit_content.outputs.artifact }}
130+ tar -zcf ${{ needs.generate_workflow_content.outputs.artifact }}.tar.gz ${{ needs.generate_workflow_content.outputs.artifact }}
113131
114132 - name : Create a Release
115133 uses : ncipollo/release-action@v1
@@ -120,4 +138,6 @@ jobs:
120138 body : ${{ needs.get_tag.outputs.changelog }}
121139 allowUpdates : true
122140 generateReleaseNotes : true
123- artifacts : " cookiecutter_content_${{ github.ref_name }}_${{ needs.get_tag.outputs.new_tag }}.tar.gz"
141+ artifacts : |
142+ ${{ needs.generate_flit_content.outputs.artifact }}.tar.gz
143+ ${{ needs.generate_workflow_content.outputs.artifact }}.tar.gz
0 commit comments