Compare commits

...
5 Commits
Author SHA1 Message Date
legonzaur 6c56c8682f Merge branch 'main' of git.legonzaur.fr:heronfief/front 2024-08-02 20:04:56 +02:00
legonzaur 92a9d52a8c Ci : skip ssh setup 2024-08-02 20:03:31 +02:00
legonzaur 80f6d02fc7 Update .gitea/workflows/build.yml 2024-08-01 10:44:09 +00:00
legonzaur da54495d1c Ci : add more tags 2024-08-01 08:12:50 +00:00
legonzaur f60ec850f0 Ci : fix repo name in tag 2024-08-01 08:12:33 +00:00
+15 -21
View File
@@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
env:
DOCKER_ORG: heronfief
REPO_NAME: ${{ gitea.repository }}
ENDPOINT: git.legonzaur.fr
steps:
@@ -20,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
@@ -51,16 +37,24 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.ENDPOINT }}/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}
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: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}