mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-12 19:05:55 +02:00
chore: tags for docker build
This commit is contained in:
parent
a2c0e804a4
commit
8c72156ab8
1 changed files with 15 additions and 9 deletions
24
.github/workflows/build.yml
vendored
24
.github/workflows/build.yml
vendored
|
@ -209,9 +209,17 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Get the version
|
- name: Docker meta
|
||||||
id: get_version
|
id: meta
|
||||||
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
images: |
|
||||||
|
uozi/nginx-ui
|
||||||
|
tags: |
|
||||||
|
type=schedule
|
||||||
|
type=ref,event=branch
|
||||||
|
type=semver,pattern={{version}}
|
||||||
|
type=sha
|
||||||
|
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
|
@ -232,22 +240,19 @@ jobs:
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Prepare Dockerfile
|
- name: Prepare Dockerfile
|
||||||
if: github.event_name == 'release'
|
|
||||||
run: |
|
run: |
|
||||||
cp ./Dockerfile ./dist
|
cp ./Dockerfile ./dist
|
||||||
cp -rp ./resources ./dist
|
cp -rp ./resources ./dist
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
if: github.event_name == 'release'
|
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: ./dist
|
context: ./dist
|
||||||
file: ./dist/Dockerfile
|
file: ./dist/Dockerfile
|
||||||
platforms: ${{ env.PLATFORMS }}
|
platforms: ${{ env.PLATFORMS }}
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
tags: |
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
uozi/nginx-ui:latest
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
uozi/nginx-ui:${{ steps.get_version.outputs.VERSION }}
|
|
||||||
|
|
||||||
- name: Prepare Demo Dockerfile
|
- name: Prepare Demo Dockerfile
|
||||||
run: |
|
run: |
|
||||||
|
@ -256,10 +261,11 @@ jobs:
|
||||||
|
|
||||||
- name: Build and push demo
|
- name: Build and push demo
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
|
if: github.ref == 'refs/heads/dev'
|
||||||
with:
|
with:
|
||||||
context: ./dist
|
context: ./dist
|
||||||
file: ./dist/demo.Dockerfile
|
file: ./dist/demo.Dockerfile
|
||||||
platforms: ${{ env.PLATFORMS }}
|
platforms: ${{ env.PLATFORMS }}
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: 'true'
|
||||||
tags: |
|
tags: |
|
||||||
uozi/nginx-ui-demo:latest
|
uozi/nginx-ui-demo:latest
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue