Merge pull request #28 from 0xJacky/docker-actions

Docker actions
This commit is contained in:
Jacky 2022-08-05 15:44:32 +08:00 committed by GitHub
commit c8b1110c7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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.GOARCH == 'amd64'
id: buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
if: github.event_name == 'release' && env.GOOS == 'linux' && env.GOARCH == '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.GOARCH == 'amd64'
run: |
cp ./Dockerfile ./dist
- name: Build and push
if: github.event_name == 'release' && env.GOOS == 'linux' && env.GOARCH == '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