Skip to content

Commit

Permalink
chore: tags for docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
Hintay committed Nov 15, 2024
1 parent a2c0e80 commit 9bf7370
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,17 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Get the version
id: get_version
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
- name: Docker meta
id: meta
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
uses: actions/download-artifact@v4
Expand All @@ -238,16 +246,14 @@ jobs:
cp -rp ./resources ./dist
- name: Build and push
if: github.event_name == 'release'
uses: docker/build-push-action@v6
with:
context: ./dist
file: ./dist/Dockerfile
platforms: ${{ env.PLATFORMS }}
push: ${{ github.event_name != 'pull_request' }}
tags: |
uozi/nginx-ui:latest
uozi/nginx-ui:${{ steps.get_version.outputs.VERSION }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Prepare Demo Dockerfile
run: |
Expand All @@ -256,10 +262,11 @@ jobs:
- name: Build and push demo
uses: docker/build-push-action@v6
if: github.ref == 'refs/heads/dev'
with:
context: ./dist
file: ./dist/demo.Dockerfile
platforms: ${{ env.PLATFORMS }}
push: ${{ github.event_name != 'pull_request' }}
push: 'true'
tags: |
uozi/nginx-ui-demo:latest

0 comments on commit 9bf7370

Please # to comment.