Skip to content

Commit

Permalink
Update composeImage.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Aicnal committed Nov 5, 2024
1 parent e1aeeaf commit febc672
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/composeImage.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
name: 构建镜像并推送到Docker Hub
on: push
name: 构建 Go 二进制文件

jobs:
docker-build-linux:
name: Docker build Linux
on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: 读取仓库内容
- name: 检出仓库
uses: actions/checkout@v4

- name: 登陆DockerHub
uses: docker/login-action@v3
- name: 设置 Go
uses: actions/setup-go@v4
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
go-version: '1.20'

- name: 构建并且推送到Docker Hub
uses: docker/build-push-action@v5
with:
push: true
tags: aicnal/linux-image-compressor:latest
- name: 编译二进制文件
run: |
go build -v -o composeImage ./...

0 comments on commit febc672

Please sign in to comment.