Release #2
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 | |
on: | |
release: | |
types: [published] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: write | |
env: | |
PUBLIC_FRONTEND_URL: abc123 | |
PUBLIC_OIDC_ISSUER_URL: abc123 | |
PUBLIC_OIDC_CLIENT_ID: abc123 | |
PUBLIC_API_HOST: abc123 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Setup Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
registry-url: "https://registry.npmjs.org" | |
- name: Install Dependencies | |
run: npm ci | |
- name: Patch version | |
run: npm version ${{ github.ref_name }} --no-commit-hooks --no-git-tag-version | |
- name: Build | |
run: npm run build | |
- name: Release build assets | |
run: | | |
cd ${{github.workspace}} | |
zip -r build-${{github.event.release.tag_name}}.zip build | |
gh release upload ${{github.event.release.tag_name}} build-${{github.event.release.tag_name}}.zip | |
env: | |
GITHUB_TOKEN: ${{ github.TOKEN }} | |
shell: bash | |
- name: Build & release versioned docker image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
platforms: linux/amd64,linux/arm64 | |
tags: ghcr.io/rickli-cloud/konfig:${{ github.ref_name }} | |
push: true | |
- name: Build & release latest docker image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
platforms: linux/amd64,linux/arm64 | |
tags: ghcr.io/rickli-cloud/konfig:latest | |
push: true |