mirror of
https://github.com/yusing/godoxy.git
synced 2025-07-04 14:04:25 +02:00
workflow updte
This commit is contained in:
parent
af37d1f29e
commit
a8ecafcd09
2 changed files with 23 additions and 28 deletions
21
.github/workflows/docker-image.yml
vendored
21
.github/workflows/docker-image.yml
vendored
|
@ -2,17 +2,16 @@ name: Docker Image CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "main" ]
|
tags:
|
||||||
pull_request:
|
- "*.*.*"
|
||||||
branches: [ "main" ]
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
build_and_push:
|
||||||
build:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- name: Get the version
|
||||||
- name: Build the Docker image
|
uses: actions/checkout@v3
|
||||||
run: docker build . --file Dockerfile --tag go-proxy:$(date +%s) --tag go-proxy:0.4 --tag go-proxy:latest
|
id: get_version
|
||||||
|
- name: Build and Push Container to ghcr.io
|
||||||
|
uses: GlueOps/github-actions-build-push-containers@v0.3.7
|
||||||
|
with:
|
||||||
|
tags: latest,${{ steps.get_version.outputs.VERSION }}
|
||||||
|
|
14
.github/workflows/go.yml
vendored
14
.github/workflows/go.yml
vendored
|
@ -5,12 +5,10 @@ name: Go
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "main" ]
|
tags:
|
||||||
pull_request:
|
- "*.*.*"
|
||||||
branches: [ "main" ]
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
@ -19,16 +17,14 @@ jobs:
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v4
|
uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: '1.22.1'
|
go-version: "1.22.1"
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: make build
|
run: make build
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Release
|
||||||
uses: actions/upload-artifact@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
name: go-proxy
|
|
||||||
path: bin/go-proxy
|
path: bin/go-proxy
|
||||||
|
|
||||||
#- name: Test
|
#- name: Test
|
||||||
# run: go test -v ./...
|
# run: go test -v ./...
|
||||||
|
|
Loading…
Add table
Reference in a new issue