Skip to content

Commit

Permalink
fix(ops): add deploy to release
Browse files Browse the repository at this point in the history
  • Loading branch information
Courtcircuits committed Aug 2, 2024
1 parent 2ea4a1e commit d91e4c0
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 44 deletions.
44 changes: 0 additions & 44 deletions .github/workflows/deploy.yml

This file was deleted.

38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,41 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release
get_tag:
needs: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set output
id: vars
run: echo "tag=$GITHUB_REF" | sed s/"refs\/tags\/v/"/g >> $GITHUB_OUTPUT
- name: Check output
env:
RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
run: |
echo $RELEASE_VERSION
echo ${{ steps.vars.outputs.tag }}
deploy:
name: deploy_project
runs-on: ubuntu-latest
needs: get_tag
env:
TAG: ${{ needs.get_tag.outputs.tag }}
steps:
- name: Checkout the repo
uses: actions/checkout@v4
with:
repository: Courtcircuits/cluster
token: "${{ secrets.DEPLOYMENT_TOKEN }}"
- name: Update values.yaml
run: |
sudo add-apt-repository ppa:rmescandon/yq
sudo apt update
sudo apt install yq -y
cd projects/gists/gists
yq eval -i '.tag = env(TAG)' tag.yaml
git config --global user.name "GIST Bot"
git config --global user.email "[email protected]"
git add tag.yaml
git commit -m "api gist | ${{ env.TAG }} | ${{ github.event.head_commit.message }}"
git push

0 comments on commit d91e4c0

Please sign in to comment.