Skip to content

Commit 698910f

Browse files
committed
workflows: Add production release tagging
Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
1 parent 305b014 commit 698910f

1 file changed

Lines changed: 60 additions & 0 deletions

File tree

.github/workflows/production.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,68 @@ jobs:
1818
uses: Ilshidur/action-discord@master
1919
with:
2020
args: 'Maestro production deploy started: "${{ inputs.message }}" by ${{ github.actor }}'
21+
tag-core:
22+
runs-on: ubuntu-latest
23+
needs: discord-notify-start
24+
steps:
25+
- name: Checkout code
26+
uses: actions/checkout@v4
27+
with:
28+
repository: kernelci/kernelci-core
29+
ref: main
30+
- name: Tag repositories
31+
run: |
32+
git config --global user.name "github-actions[bot]"
33+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
34+
TAG="production-$(date +'%Y%m%d%H%M%S')"
35+
echo "Tagging repositories with tag: $TAG"
36+
git tag $TAG
37+
git push origin $TAG
38+
echo "Tagged kernelci/kernelci-core with $TAG"
39+
# Add similar tagging commands for other repositories as needed
40+
tag-pipeline:
41+
runs-on: ubuntu-latest
42+
needs: discord-notify-start
43+
steps:
44+
- name: Checkout code
45+
uses: actions/checkout@v4
46+
with:
47+
repository: kernelci/kernelci-pipeline
48+
ref: main
49+
- name: Tag repositories
50+
run: |
51+
git config --global user.name "github-actions[bot]"
52+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
53+
TAG="production-$(date +'%Y%m%d%H%M%S')"
54+
echo "Tagging repositories with tag: $TAG"
55+
git tag $TAG
56+
git remote set-url origin https://x-access-token:${{ secrets.GHPAT}}@github.com/kernelci/kernelci-pipeline.git
57+
git push origin $TAG
58+
echo "Tagged kernelci/kernelci-pipeline with $TAG"
59+
# Add similar tagging commands for other repositories as needed
60+
tag-api:
61+
runs-on: ubuntu-latest
62+
needs: discord-notify-start
63+
steps:
64+
- name: Checkout code
65+
uses: actions/checkout@v4
66+
with:
67+
repository: kernelci/kernelci-api
68+
ref: main
69+
- name: Tag repositories
70+
run: |
71+
git config --global user.name "github-actions[bot]"
72+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
73+
TAG="production-$(date +'%Y%m%d%H%M%S')"
74+
echo "Tagging repositories with tag: $TAG"
75+
git tag $TAG
76+
git remote set-url origin https://x-access-token:${{ secrets.GHPAT }}@github.com/kernelci/kernelci-api.git
77+
git push origin $TAG
78+
echo "Tagged kernelci/kernelci-api with $TAG"
79+
# Add similar tagging commands for other repositories as needed
2180
call-docker-build:
2281
uses: ./.github/workflows/docker_images.yml
82+
needs: [tag-core, tag-pipeline, tag-api]
2383
secrets: inherit
2484
with:
2585
GIT_OWNER: 'kernelci'

0 commit comments

Comments
 (0)