mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 02:15:48 +02:00
Update build.yml
This commit is contained in:
parent
b3a5fd91b9
commit
7595ff41e3
1 changed files with 137 additions and 109 deletions
34
.github/workflows/build.yml
vendored
34
.github/workflows/build.yml
vendored
|
@ -46,7 +46,7 @@ jobs:
|
|||
run: yarn install
|
||||
working-directory: frontend
|
||||
|
||||
- name: Update tranlations
|
||||
- name: Update translations
|
||||
run: yarn gettext:compile
|
||||
working-directory: frontend
|
||||
|
||||
|
@ -79,8 +79,8 @@ jobs:
|
|||
needs: build_frontend
|
||||
strategy:
|
||||
matrix:
|
||||
goos: [linux, darwin]
|
||||
goarch: [amd64, 386, arm64]
|
||||
goos: [ linux, darwin ]
|
||||
goarch: [ amd64, 386, arm64 ]
|
||||
exclude:
|
||||
# Exclude i386 on darwin.
|
||||
- goarch: 386
|
||||
|
@ -186,3 +186,31 @@ jobs:
|
|||
if: github.event_name == 'release'
|
||||
with:
|
||||
files: ${{ env.DIST }}.tar.gz
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
if: github.event_name == 'release' && env.GOOS == 'linux' && env.GOOS == 'amd64'
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Login to DockerHub
|
||||
if: github.event_name == 'release' && env.GOOS == 'linux' && env.GOOS == 'amd64'
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USER }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Prepare Dockerfile
|
||||
if: github.event_name == 'release' && env.GOOS == 'linux' && env.GOOS == 'amd64'
|
||||
run: |
|
||||
cp ./Dockerfile ./dist
|
||||
|
||||
- name: Build and push
|
||||
if: github.event_name == 'release' && env.GOOS == 'linux' && env.GOOS == 'amd64'
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: ./dist
|
||||
file: ./dist/Dockerfile
|
||||
platforms: linux/amd64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: |
|
||||
uozi/nginx-ui:latest
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue