Skip to content

Commit

Permalink
brought back sed
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyriakos Akriotis committed Jul 11, 2024
1 parent ab0e1ef commit 3561d80
Showing 1 changed file with 6 additions and 50 deletions.
56 changes: 6 additions & 50 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,56 +84,14 @@ jobs:

- name: Show Contents
run: ls -latr

- uses: fjogeleit/yaml-update-action@main
with:
valueFile: './charts/docusaurus/Chart.yaml'
createPR: 'false'
commitChange: 'false'
changes: |
{
"version": "${{ vars.APP_VERSION }}.${{github.run_number}}",
"appVersion": "${{ vars.APP_VERSION }}.${{github.run_number}}-${{ steps.commit_hash.outputs.short }}"
}
- uses: fjogeleit/yaml-update-action@main
with:
valueFile: './charts/typesense/Chart.yaml'
createPR: 'false'
commitChange: 'false'
changes: |
{
"version": "${{ vars.APP_VERSION }}.${{github.run_number}}",
"appVersion": "${{ vars.APP_VERSION }}.${{github.run_number}}-${{ steps.commit_hash.outputs.short }}"
}
# - name: Update Docusaurus Chart.yaml
# uses: rmeneely/update-yaml@v1
# with:
# infile: './charts/docusaurus/Chart.yaml'
# varlist: version=${{ vars.APP_VERSION }}.${{github.run_number}},appVersion=${{ vars.APP_VERSION }}.${{github.run_number}}-${{ steps.commit_hash.outputs.short }}

# - name: Update Docusaurus values.yaml
# uses: rmeneely/update-yaml@v1
# with:
# infile: './charts/docusaurus/values.yaml'
# varlist: image.tag=${{ vars.APP_VERSION }}.${{github.run_number}}-${{ steps.commit_hash.outputs.short }},env.typesenseHost=${{ vars.TYPESENSE_HOST }},env.typesensePort=\"${{ vars.TYPESENSE_PORT }}\",env.typesenseProtocol=${{ vars.TYPESENSE_PROTOCOL }},env.typesenseSearchApiKey=${{ secrets.TYPESENSE_SEARCH_KEY }},ingress.elbId=${{ vars.DOCS_NEXT_ELB_ID }},ingress.host=${{ vars.DOCS_NEXT_HOST }},ingress.port=80

# - name: Update Typesense Chart.yaml
# uses: rmeneely/update-yaml@v1
# with:
# infile: './charts/typesense/Chart.yaml'
# varlist: version=${{ vars.APP_VERSION }}.${{github.run_number}},appVersion=${{ vars.APP_VERSION }}.${{github.run_number}}-${{ steps.commit_hash.outputs.short }}

# - name: Update Typesense values.yaml
# uses: rmeneely/update-yaml@v1
# with:
# infile: './charts/typesense/values.yaml'
# varlist: typesense.apiKey=${{ secrets.TYPESENSE_API_KEY }},docusaurus.externalUrl=${{ vars.DOCS_NEXT_HOST }},reverseProxy.ingress.elbId=${{ vars.TYPESENSE_ELB_ID }},reverseProxy.ingress.host=${{ vars.TYPESENSE_HOST }},reverseProxy.ingress.port=${{ vars.TYPESENSE_PORT }}

- name: Commit Changes
- name: Update Charts and Commit Changes
id: update_charts
run: |
# docusaurus
sed -i 's/^version: .*/version: ${{ vars.APP_VERSION }}.${{github.run_number}}/' ./charts/docusaurus/Chart.yaml
sed -i 's/^appVersion: .*/appVersion: ${{ vars.APP_VERSION }}.${{github.run_number}}-${{ steps.commit_hash.outputs.short }}/' ./charts/docusaurus/Chart.yaml
sed -i 's/^tag: .*/tag: ${{ steps.commit_hash.outputs.short }}/' ./charts/docusaurus/values.yaml
cat ./charts/docusaurus/Chart.yaml
echo ""
echo "---"
Expand All @@ -143,14 +101,12 @@ jobs:
echo "---"
echo ""
# typesense
sed -i 's/^version: .*/version: ${{ vars.APP_VERSION }}.${{github.run_number}}/' ./charts/typesense/Chart.yaml
sed -i 's/^appVersion: .*/appVersion: ${{ vars.APP_VERSION }}.${{github.run_number}}-${{ steps.commit_hash.outputs.short }}/' ./charts/typesense/Chart.yaml
cat ./charts/typesense/Chart.yaml
echo ""
echo "---"
echo ""
cat ./charts/typesense/values.yaml
echo ""
echo "---"
echo ""
# commit and push
git commit -am "Automatic commit from GitHub Actions triggered by action #${{github.run_number}}"
git remote set-url origin https://${{ secrets.DOCS_NEXT_CHARTS_TOKEN }}@github.com/${{ vars.DOCS_NEXT_CHARTS_ORG }}/${{ vars.DOCS_NEXT_CHARTS_REPO }}.git
Expand Down

0 comments on commit 3561d80

Please sign in to comment.