Skip to content

Merge pull request #115 from philiplehmann/renovate/node-22.x-lockfile #176

Merge pull request #115 from philiplehmann/renovate/node-22.x-lockfile

Merge pull request #115 from philiplehmann/renovate/node-22.x-lockfile #176

Workflow file for this run

name: build & deploy
on:
workflow_dispatch:
push:
branches:
- 'main'
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
image: tonistiigi/binfmt:qemu-v8.1.5
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to harbor.riwi.dev registry
uses: docker/login-action@v3
with:
registry: harbor.riwi.dev
username: ${{ secrets.HARBOR_USER }}
password: ${{ secrets.HARBOR_TOKEN }}
- name: set version
run: echo "TAG_VERSION=$(date +'%y-%m-%d').$GITHUB_RUN_NUMBER" >> $GITHUB_ENV
- name: Build and push frontend
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
platforms: linux/amd64,linux/arm64
build-args: |
NPM_TOKEN=${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
push: true
cache-from: type=registry,ref=harbor.riwi.dev/philiplehmann/staking:buildcache
cache-to: type=registry,ref=harbor.riwi.dev/philiplehmann/staking:buildcache,mode=max,image-manifest=true
tags: |
harbor.riwi.dev/philiplehmann/staking:latest
harbor.riwi.dev/philiplehmann/staking:${{ env.TAG_VERSION }}
- uses: philiplehmann/[email protected]
- name: deploy
run: |
cd kustomize/staking
kustomize edit set image harbor.riwi.dev/philiplehmann/staking=harbor.riwi.dev/philiplehmann/staking:${{ env.TAG_VERSION }}
- name: Commit & Push changes
uses: actions-js/push@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
message: Set image tag to `${{ env.TAG_VERSION }}`
rebase: true