3.8.0 #439
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: Continuous Integration | |
env: | |
# Use docker.io for Docker Hub if empty | |
REGISTRY: ghcr.io | |
# github.repository as <account>/<repo> | |
IMAGE_NAME: ${{ github.repository }} | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- 'k8s/**' | |
- 'Dockerfile.base' | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 🛎️ Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- id: imagename | |
uses: ASzc/change-string-case-action@v6 | |
with: | |
string: ${{ github.repository }} | |
- name: 📝 Get Current Version | |
id: package-version | |
uses: martinbeentjes/npm-get-version-action@main | |
- name: 🔐 Login to Docker Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: 🏗️ Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: 🔧 Build and push Docker Image | |
uses: docker/build-push-action@v6 | |
with: | |
push: true | |
tags: | | |
${{ env.REGISTRY }}/${{ steps.imagename.outputs.lowercase }}:${{ steps.package-version.outputs.current-version}} | |
${{ env.REGISTRY }}/${{ steps.imagename.outputs.lowercase }}:latest | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- name: 🎫 Update patch version | |
run: | | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git config --global user.name "github-actions[bot]" | |
git pull --rebase origin main | |
npm version patch | |
git push origin main |