version auto au merge dans main
This commit is contained in:
@@ -1,34 +1,37 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
name: Build & push Docker image
|
||||
bump-version:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: https://github.com/actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: https://github.com/docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Gitea container registry
|
||||
uses: https://github.com/docker/login-action@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
registry: git.goutailler-olivier.com
|
||||
username: ${{ gitea.actor }}
|
||||
password: ${{ secrets.RELEASE_TOKEN }}
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Set lowercase repo name
|
||||
id: repo
|
||||
run: echo "name=$(echo '${{ gitea.repository }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build and push
|
||||
uses: https://github.com/docker/build-push-action@v6
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: |
|
||||
git.goutailler-olivier.com/${{ steps.repo.outputs.name }}:${{ gitea.ref_name }}
|
||||
git.goutailler-olivier.com/${{ steps.repo.outputs.name }}:latest
|
||||
node-version: '22'
|
||||
|
||||
- name: Configure git
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
|
||||
- name: Bump patch version
|
||||
run: npm version patch -m "chore: bump version to %s [skip ci]"
|
||||
|
||||
- name: Push version commit and tag
|
||||
run: |
|
||||
git push
|
||||
git push --tags
|
||||
|
||||
Reference in New Issue
Block a user