Merge remote-tracking branch 'origin/develop' into merge-release-into… #54
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: "Release Komiser" | |
on: | |
push: | |
# run only against tags | |
tags: | |
- "*" | |
permissions: write-all | |
jobs: | |
build_frontend: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: "npm" | |
cache-dependency-path: "dashboard/package-lock.json" | |
- run: npm ci | |
working-directory: dashboard | |
- run: npm run build | |
working-directory: dashboard | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: dashboard-build | |
path: dashboard/out | |
build_komiser: | |
runs-on: ubuntu-latest | |
needs: build_frontend | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- run: git fetch --force --tags | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: ">=1.20.2" | |
cache: true | |
- name: Install go-bin-data | |
run: | | |
go install -a -v github.com/go-bindata/go-bindata/...@latest | |
go install -v github.com/elazarl/go-bindata-assetfs/... | |
- uses: actions/download-artifact@v3 | |
with: | |
name: dashboard-build | |
path: out | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_LOGIN }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
- uses: goreleaser/goreleaser-action@v4 | |
with: | |
distribution: goreleaser | |
version: latest | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
SEGMENT_WRITE_KEY: ${{ secrets.SEGMENT_WRITE_KEY }} | |
PURPLIN_BOT: ${{ secrets.PURPLIN_BOT }} | |
DISCORD_FEEDBACK_URL: ${{ secrets.DISCORD_FEEDBACK_URL }} | |
- uses: actions/checkout@v4 | |
with: | |
repository: tailwarden/helm | |
ref: master | |
path: helm | |
token: ${{ secrets.PURPLIN_BOT }} | |
persist-credentials: true | |
- name: "Create new values.yaml" | |
id: release-version | |
run: | | |
export VERSION=$(echo $TAG | cut -c2-) | |
echo "RELEASE_VERSION=${VERSION}" >> $GITHUB_OUTPUT | |
cat templates/values.template.yaml | envsubst > helm/values.yaml | |
env: | |
TAG: ${{ github.ref_name }} | |
- name: "Push changes to tailwarden/helm" | |
run: | | |
cd ./helm | |
git add . | |
git config user.name "purplin" | |
git config user.email "purplin@tailwarden.com" | |
if [ -z "$(git status --porcelain)" ]; then | |
echo "No changes to commit" | |
exit 0 | |
fi | |
git commit -m "chore: bump version to ${VERSION}" | |
git push | |
env: | |
VERSION: ${{ steps.release-version.outputs.RELEASE_VERSION }} |