Repository navigation
54 lines (51 loc) · 1.68 KB
/
Copy pathupdate-dev-epoch-tag.yaml
File metadata and controls
54 lines (51 loc) · 1.68 KB
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
name: update-dev-epoch-tag
on:
workflow_dispatch:
inputs:
old-dev-epoch:
required: true
type: string
jobs:
setup:
runs-on: ubuntu-latest
outputs:
new-dev-epoch: ${{ fromJSON(steps.yaml.outputs.data).active_epoch }}
plugin-matrix: ${{ steps.yaml.outputs.data }}
steps:
- uses: actions/checkout@v3
with:
repository: qiime2/distributions
sparse-checkout: |
data.yaml
- name: "get distro info"
id: yaml
uses: qiime2/distributions/.github/actions/read-yaml@dev
with:
file: data.yaml
update-tags:
needs: [setup]
runs-on: ubuntu-latest
env:
OLD_DEV_TAG: ${{ inputs.old-dev-epoch }}.0.dev0
NEW_DEV_TAG: ${{ needs.setup.outputs.new-dev-epoch }}.0.dev0
strategy:
fail-fast: false
matrix:
packages: ${{ fromJSON(needs.setup.outputs.plugin-matrix).packages }}
steps:
- uses: actions/checkout@v3
with:
path: ./dev-checkout
token: ${{ secrets.BOT_PAT }}
repository: ${{ matrix.packages.repo }}
- name: "checkout main branch, remove old tag, commit for new dev epoch"
shell: bash
run: |
cd ./dev-checkout
git config --global user.name 'q2d2'
git config --global user.email 'q2d2.noreply@gmail.com'
git push --delete origin "${{ env.OLD_DEV_TAG }}"
git commit --allow-empty -m "DEV: ${{ needs.setup.outputs.new-dev-epoch }} [skip ci]"
git tag -a "${{ env.NEW_DEV_TAG }}" -m "${{ matrix.packages.name }} ${{ env.NEW_DEV_TAG }}"
git push origin --tags "${{ env.NEW_DEV_TAG }}"
git push origin