11name : ' Production deploy'
2+ permissions :
3+ contents : write
24
35on :
46 workflow_dispatch :
2729 with :
2830 repository : kernelci/kernelci-core
2931 ref : main
32+ fetch-depth : 0
3033 - name : Tag repositories
3134 run : |
3235 git config --global user.name "github-actions[bot]"
@@ -46,14 +49,19 @@ jobs:
4649 with :
4750 repository : kernelci/kernelci-pipeline
4851 ref : main
52+ fetch-depth : 0
53+ token : ${{ secrets.GHPAT }}
54+ persist-credentials : false
4955 - name : Tag repositories
56+ env :
57+ TOKEN : ${{ secrets.GHPAT }}
5058 run : |
5159 git config --global user.name "github-actions[bot]"
5260 git config --global user.email "github-actions[bot]@users.noreply.github.com"
5361 TAG="production-$(date +'%Y%m%d%H%M%S')"
5462 echo "Tagging repositories with tag: $TAG"
5563 git tag $TAG
56- git remote set-url origin https://x-access-token:${{ secrets.GHPAT} }@github.com/kernelci/kernelci-pipeline.git
64+ git remote set-url origin https://x-access-token:${TOKEN }@github.com/kernelci/kernelci-pipeline.git
5765 git push origin $TAG
5866 echo "Tagged kernelci/kernelci-pipeline with $TAG"
5967 # Add similar tagging commands for other repositories as needed
@@ -66,14 +74,19 @@ jobs:
6674 with :
6775 repository : kernelci/kernelci-api
6876 ref : main
77+ fetch-depth : 0
78+ token : ${{ secrets.GHPAT }}
79+ persist-credentials : false
6980 - name : Tag repositories
81+ env :
82+ TOKEN : ${{ secrets.GHPAT }}
7083 run : |
7184 git config --global user.name "github-actions[bot]"
7285 git config --global user.email "github-actions[bot]@users.noreply.github.com"
7386 TAG="production-$(date +'%Y%m%d%H%M%S')"
7487 echo "Tagging repositories with tag: $TAG"
7588 git tag $TAG
76- git remote set-url origin https://x-access-token:${{ secrets.GHPAT } }@github.com/kernelci/kernelci-api.git
89+ git remote set-url origin https://x-access-token:${TOKEN }@github.com/kernelci/kernelci-api.git
7790 git push origin $TAG
7891 echo "Tagged kernelci/kernelci-api with $TAG"
7992 # Add similar tagging commands for other repositories as needed
0 commit comments