feat: add a button to copy pull URL (#118) #133
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 | |
on: | |
push: | |
branches: [main] | |
permissions: | |
contents: read | |
packages: write | |
id-token: write | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22.5.0 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Install Cosign | |
uses: sigstore/[email protected] | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Log in to GHCR | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build assets | |
run: pnpm install && pnpm build | |
env: | |
VITE_COMMIT_SHA: ${{ github.sha }} | |
- name: Tag image | |
uses: docker/metadata-action@v5 | |
id: meta | |
with: | |
images: ghcr.io/${{ github.repository }} | |
tags: | | |
type=raw,value=${{ github.sha }} | |
type=raw,value=latest | |
- name: Build and push image | |
uses: docker/build-push-action@v5 | |
with: | |
context: apps/webapp | |
push: true | |
platforms: linux/amd64,linux/arm64 | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
build-args: | | |
VITE_COMMIT_SHA=${{ github.sha }} | |
- name: Sign image | |
run: | | |
cosign sign --yes --key env://COSIGN_PRIVATE_KEY ghcr.io/${{ github.repository }}:${{ github.sha }} | |
cosign sign --yes --key env://COSIGN_PRIVATE_KEY ghcr.io/${{ github.repository }}:latest | |
env: | |
COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }} | |
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }} | |
helm: | |
runs-on: ubuntu-latest | |
needs: [docker] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Cosign | |
uses: sigstore/[email protected] | |
- name: Log in to GHCR | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Update image tag in values.yaml | |
uses: fjogeleit/yaml-update-action@main | |
with: | |
valueFile: helm/mergeable/values.yaml | |
propertyPath: image.tag | |
value: ${{ github.sha }} | |
commitChange: false | |
- name: Package chart | |
run: helm package helm/mergeable --version 0.0.${{ github.run_number }} --destination dist | |
- name: Push chart | |
run: helm push dist/*.tgz oci://ghcr.io/pvcnt/helm |