Update build.yml

This commit is contained in:
0xJacky 2022-08-05 15:34:46 +08:00
parent b3a5fd91b9
commit 7595ff41e3
No known key found for this signature in database
GPG key ID: B6E4A6E4A561BAF0

View file

@ -46,7 +46,7 @@ jobs:
run: yarn install
working-directory: frontend
- name: Update tranlations
- name: Update translations
run: yarn gettext:compile
working-directory: frontend
@ -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