guneriu has triggered a Deploy Workflow! π #37
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Workflow | |
run-name: ${{ github.actor }} has triggered a Deploy Workflow! π | |
on: | |
push: | |
branches: [main] | |
jobs: | |
package-and-publish: | |
name: Package & Publish | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
permissions: | |
contents: write | |
packages: write | |
issues: write | |
pull-requests: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Configure Git | |
run: | | |
git config user.name "$GITHUB_ACTOR" | |
git config user.email "[email protected]" | |
- name: Install Helm | |
uses: azure/setup-helm@v4 | |
env: | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
- name: Run linter | |
run: helm lint yilu-common --set image.tag="test" --set serviceName="ci-test" | |
- name: Extract Branch Name | |
id: extract_branch_name | |
run: echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT | |
- name: Publish | |
run: ./scripts/publish_chart.sh | |
env: | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
CI_COMMIT_MESSAGE: ${{ github.event.head_commit.message }} | |
CI_BRANCH: ${{ steps.extract_branch_name.outputs.BRANCH_NAME }} |