Skip to content

Commit

Permalink
添加docker build, push action
Browse files Browse the repository at this point in the history
  • Loading branch information
wujunwei928 committed Aug 30, 2022
1 parent 32b6deb commit 61d6d14
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: dev Build Docker Image

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
name: Build Docker Image
runs-on: ubuntu-latest
steps:

- name: Checkout Github Code
uses: actions/checkout@v3

- name: Set Up Golang Environment
uses: actions/setup-go@v3
with:
go-version: 1.17

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
file: Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/parse-video:latest

0 comments on commit 61d6d14

Please sign in to comment.