v0.1.4 #30
Workflow file for this run
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: Create Release | |
on: | |
release: | |
types: [released] | |
workflow_dispatch: | |
jobs: | |
build-publish-image: | |
name: Build and Publish Image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set Variables | |
id: vars | |
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | |
- name: Login to registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Docker Build and Push | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
push: true | |
tags: ghcr.io/noahburrell0/sealed-secrets-ui:latest,ghcr.io/noahburrell0/sealed-secrets-ui:${{ steps.vars.outputs.tag }} | |
publish-helm-chart: | |
name: Publish Helm Chart | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set Variables | |
id: vars | |
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | |
- name: Configure Git | |
run: | | |
git config user.name "$GITHUB_ACTOR" | |
git config user.email "[email protected]" | |
# Get current chart version and increment | |
- name: Get Chart Version | |
uses: mikefarah/yq@master | |
id: get_chart_version | |
with: | |
cmd: yq '.version' charts/sealed-secrets-ui/Chart.yaml | |
- name: Increment Chart Version | |
uses: christian-draeger/[email protected] | |
id: new_chart_version | |
with: | |
current-version: ${{ steps.get_chart_version.outputs.result }} | |
version-fragment: 'bug' | |
# Update Chart.yaml with new version and appVersion | |
- name: Update Chart.yaml version and appVersion | |
uses: fjogeleit/yaml-update-action@main | |
with: | |
valueFile: 'charts/sealed-secrets-ui/Chart.yaml' | |
changes: '{"appVersion": "${{ steps.vars.outputs.tag }}", "version": "${{ steps.new_chart_version.outputs.next-version }}"}' | |
branch: main | |
masterBranchName: main | |
commitChange: true | |
createPR: false | |
message: 'Update Chart appVersion to ${{ steps.vars.outputs.tag }} and version to ${{ steps.new_chart_version.outputs.next-version }}' | |
# Create and publish the chart | |
- name: Release Chart | |
uses: helm/[email protected] | |
with: | |
version: v1.5.0 | |
config: charts/config.yaml | |
env: | |
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |