45 lines
1.3 KiB
YAML
45 lines
1.3 KiB
YAML
name: Publish latest version
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
container:
|
|
image: ghcr.io/catthehacker/ubuntu:act-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Checkout LFS
|
|
run: |
|
|
function EscapeForwardSlash() { echo "$1" | sed 's/\//\\\//g'; }
|
|
readonly ReplaceStr="EscapeForwardSlash ${{ gitea.repository }}.git/info/lfs/objects/batch"; sed -i "s/\(\[http\)\( \".*\)\"\]/\1\2`$ReplaceStr`\"]/" .git/config
|
|
|
|
git config --local lfs.transfer.maxretries 1
|
|
|
|
/usr/bin/git lfs fetch origin refs/remotes/origin/${{ gitea.ref_name }}
|
|
/usr/bin/git lfs checkout
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Sanitize metadata
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
tags: latest
|
|
images: git.mylloon.fr/${{ github.repository }}
|
|
|
|
- name: Login to Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ github.server_url }}
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.TOKEN }}
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
tags: ${{ steps.meta.outputs.tags }}
|