1414 runs-on : ubuntu-latest
1515 outputs :
1616 image_version : ${{ env.IMAGE_SEMVER }}
17+ commit_hash : ${{ steps.export_commit_hash.outputs.commit_hash }}
1718
1819 steps :
1920 - name : Checkout
@@ -27,10 +28,18 @@ jobs:
2728 - name : Install NodeJS Dependencies
2829 run : npm install
2930
31+ - name : Get Commit Hash
32+ id : commit_hash
33+ uses : prompt/actions-commit-hash@v3
34+
3035 - name : Build Version Tag
3136 id : build_version_tag
3237 run : echo "IMAGE_SEMVER=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
3338
39+ - name : Export Commit Hash
40+ id : export_commit_hash
41+ run : echo "commit_hash=${{ steps.commit_hash.outputs.short }}" >> $GITHUB_OUTPUT
42+
3443 - name : Build Container Image Metadata
3544 id : meta
3645 uses : docker/metadata-action@v5
8392 labels : ${{ steps.meta.outputs.labels }}
8493 annotations : ${{ steps.meta.outputs.annotations }}
8594
95+ update-helm-charts :
96+ needs : [build-stable]
97+ environment : stable
98+ runs-on : ubuntu-latest
99+ permissions :
100+ contents : write
101+ pull-requests : write
102+
103+ steps :
104+ # - name: Create GitHub App Token
105+ # id: app-token
106+ # uses: actions/create-github-app-token@v1
107+ # with:
108+ # app-id: ${{ secrets.APP_ID }}
109+ # private-key: ${{ secrets.APP_KEY }}
110+ - name : Checkout Charts Repo
111+ uses : actions/checkout@v4
112+ with :
113+ repository : " ${{ vars.DOCS_NEXT_CHARTS_ORG }}/${{ vars.DOCS_NEXT_CHARTS_REPO }}"
114+ token : ${{ secrets.DOCS_NEXT_TOKEN }}
115+ - name : Commit Changes
116+ env :
117+ image : ${{ vars.REGISTRY }}/${{ vars.REGISTRY_ORG }}/${{ vars.IMG_NAME }}
118+ tag : ${{ needs.build-stable.outputs.image_version }}
119+ run : |
120+ git config --global user.name 'otcbot'
121+ git config --global user.email '[email protected] ' 122+ sed -i 's|^version: .*|version: 0.3.${{github.run_number}}|' ./charts/docusaurus/Chart.yaml
123+ sed -i 's|^appVersion: .*|appVersion:${{ env.tag }}/' ./charts/docusaurus/Chart.yaml
124+ sed -i 's|^tag: .*|tag: ${{ env.tag }}|' ./charts/docusaurus/values-prod.yaml
125+ sed -i 's|^image: .*|image: ${{ env.image }}|' ./charts/docusaurus/values-prod.yaml
126+ git commit -am "Automatic commit from GitHub Actions triggered by action ${{github.run_number}}"
127+ - name : Create Pull Request
128+ uses : peter-evans/create-pull-request@v7
129+ env :
130+ remote_pr_branch : ' release/production-${{ needs.build-stable.outputs.image_version }}'
131+ with :
132+ title : ${{ env.remote_pr_branch }}
133+ token : ${{ secrets.DOCS_NEXT_TOKEN }}
134+ branch : ${{ env.remote_pr_branch }}
86135
0 commit comments