Compare commits
10
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6c56c8682f | ||
|
|
92a9d52a8c | ||
|
|
80f6d02fc7 | ||
|
|
da54495d1c | ||
|
|
f60ec850f0 | ||
|
|
bce8edc150 | ||
|
|
fadc8cc451 | ||
|
|
8cb8bdfc5e | ||
|
|
0f1ab017ed | ||
|
|
9384f8f23e |
+24
-28
@@ -1,19 +1,16 @@
|
||||
name: release-tag
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [released]
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
tags:
|
||||
- "**"
|
||||
|
||||
jobs:
|
||||
release-image:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
DOCKER_ORG: heronfief
|
||||
DOCKER_LATEST: nightly
|
||||
REPO_NAME: ${{ gitea.repository }}
|
||||
ENDPOINT: git.legonzaur.fr
|
||||
|
||||
steps:
|
||||
@@ -23,24 +20,10 @@ jobs:
|
||||
lfs: false
|
||||
persist-credentials: false
|
||||
|
||||
- name: Get Meta
|
||||
id: meta
|
||||
run: |
|
||||
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT
|
||||
echo REPO_VERSION=$(git describe --tags --always | sed 's/^v//') >> $GITHUB_OUTPUT
|
||||
|
||||
- name: setup private key
|
||||
- name: LFS Checkout
|
||||
shell: bash
|
||||
run: |
|
||||
echo "${{ secrets.RUNNER_SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
|
||||
chmod 400 ~/.ssh/id_ed25519
|
||||
echo "{{ secrets.INSTANCE_SSH_PUBLIC_KEY }} > ~/.ssh/known_hosts"
|
||||
|
||||
- name: git lfs pull
|
||||
shell: bash
|
||||
run: |
|
||||
ssh-keyscan ${{ env.ENDPOINT }} >> ~/.ssh/known_hosts
|
||||
git remote set-url origin git@${{ env.ENDPOINT }}:${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}.git
|
||||
git remote set-url origin https://${{ env.ENDPOINT }}/${{ env.REPO_NAME }}.git
|
||||
git lfs pull
|
||||
|
||||
- name: Login to DockerHub
|
||||
@@ -50,15 +33,28 @@ jobs:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.ENDPOINT }}/${{ env.REPO_NAME }}
|
||||
tags: |
|
||||
type=schedule
|
||||
type=ref,event=branch
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=semver,pattern={{major}}
|
||||
type=sha
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
secrets: |
|
||||
"NUXT_PUBLIC_WEBSOCKET_ENDPOINT=${{ secrets.NUXT_PUBLIC_WEBSOCKET_ENDPOINT }}"
|
||||
"NUXT_PUBLIC_DISCORD_LOGIN_ENDPOINT=${{ secrets.NUXT_PUBLIC_DISCORD_LOGIN_ENDPOINT }}"
|
||||
build-args: |
|
||||
NUXT_PUBLIC_ENDPOINT=${{ vars.NUXT_PUBLIC_ENDPOINT }}
|
||||
NUXT_PUBLIC_DISCORD_LOGIN_ENDPOINT=${{ vars.NUXT_PUBLIC_DISCORD_LOGIN_ENDPOINT }}
|
||||
NUXT_PUBLIC_WELCOME_MESSAGE=${{ vars.NUXT_PUBLIC_WELCOME_MESSAGE }}
|
||||
push: true
|
||||
tags: | # replace it with your local IP and tags
|
||||
${{ env.ENDPOINT }}/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }}
|
||||
${{ env.ENDPOINT }}/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ env.DOCKER_LATEST }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
|
||||
Reference in New Issue
Block a user