mirror of
https://github.com/Radiquum/AniX.git
synced 2025-09-05 05:55:36 +05:00
chore: rename CI anix build tag
This commit is contained in:
parent
940c6e9de2
commit
27a16128ad
1 changed files with 8 additions and 3 deletions
11
.github/workflows/docker-anix.yml
vendored
11
.github/workflows/docker-anix.yml
vendored
|
@ -11,6 +11,7 @@ on:
|
||||||
- 'next.config.js'
|
- 'next.config.js'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -18,13 +19,17 @@ jobs:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Dynamically set 'tag' environment variable
|
- name: Dynamically set 'tag' environment variable
|
||||||
run: echo "tag=$(date +'%d-%m-%Y')" >> $GITHUB_ENV
|
# 1. parse config.ts and extract app version
|
||||||
|
# 2. set time based tag
|
||||||
|
run: |
|
||||||
|
echo "APP_VERSION=$(head -n 1 ./app/api/config.ts | tr -d "\";= " | sed "s/exportconstCURRENT_APP_VERSION//g")" >> $GITHUB_ENV
|
||||||
|
echo "IMAGE_DATE=$(date +'%d-%m-%Y')" >> $GITHUB_ENV
|
||||||
- name: Build Image
|
- name: Build Image
|
||||||
run: |
|
run: |
|
||||||
docker build . -t radiquum/anix:latest
|
docker build . -t radiquum/anix:latest
|
||||||
docker tag radiquum/anix:latest radiquum/anix:${{ env.tag }}
|
docker tag radiquum/anix:latest radiquum/anix:${{ env.APP_VERSION }}-${{ env.IMAGE_DATE }}
|
||||||
- name: Publish Image
|
- name: Publish Image
|
||||||
run: |
|
run: |
|
||||||
docker login -u radiquum -p ${{ secrets.DOCKERHUB_TOKEN }}
|
docker login -u radiquum -p ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
docker push radiquum/anix:latest
|
docker push radiquum/anix:latest
|
||||||
docker push radiquum/anix:${{ env.tag }}
|
docker push radiquum/anix:${{ env.APP_VERSION }}-${{ env.IMAGE_DATE }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue