mirror of
https://github.com/asmogo/nws.git
synced 2024-12-13 02:46:22 +00:00
Update Github action (#38)
This commit is contained in:
parent
fc4d71cbc9
commit
59ff5034f9
@ -1,11 +1,9 @@
|
|||||||
name: gobuild
|
name: latest
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
# run only against tags
|
branches:
|
||||||
tags:
|
- master
|
||||||
- '*'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker:
|
docker:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
42
.github/workflows/tag.yml
vendored
42
.github/workflows/tag.yml
vendored
@ -1,4 +1,5 @@
|
|||||||
name: goreleaser
|
name: gobuild
|
||||||
|
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@ -6,30 +7,27 @@ on:
|
|||||||
tags:
|
tags:
|
||||||
- '*'
|
- '*'
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
# packages: write
|
|
||||||
# issues: write
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
goreleaser:
|
docker:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v2
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
- name: Login to DockerHub
|
||||||
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
- run: git fetch --force --tags
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
- uses: actions/setup-go@v3
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v2
|
||||||
|
- name: Docker Setup Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2.0.0
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v3
|
||||||
with:
|
with:
|
||||||
go-version: '>=1.21.2'
|
platforms: linux/amd64,linux/arm64
|
||||||
cache: true
|
push: true
|
||||||
# More assembly might be required: Docker logins, GPG, etc. It all depends
|
tags: asmogo/nws:${{github.ref_name}}
|
||||||
# on your needs.
|
|
||||||
- uses: goreleaser/goreleaser-action@v2
|
|
||||||
with:
|
|
||||||
# either 'goreleaser' (default) or 'goreleaser-pro'
|
|
||||||
distribution: goreleaser
|
|
||||||
version: latest
|
|
||||||
args: release --clean
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@ -1,6 +1,6 @@
|
|||||||
name: tests
|
name: tests
|
||||||
|
|
||||||
on: [ push, pull_request ]
|
on: [ pull_request ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
golang:
|
golang:
|
||||||
|
@ -26,7 +26,6 @@ services:
|
|||||||
exit:
|
exit:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: cmd/nws/Dockerfile
|
|
||||||
container_name: exit
|
container_name: exit
|
||||||
command: [ "./nws","exit" ]
|
command: [ "./nws","exit" ]
|
||||||
networks:
|
networks:
|
||||||
@ -41,7 +40,6 @@ services:
|
|||||||
exit-https:
|
exit-https:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: cmd/nws/Dockerfile
|
|
||||||
container_name: exit-https
|
container_name: exit-https
|
||||||
command: ["./nws","exit","--port", "4443", "--target", "http://mint:3338"]
|
command: ["./nws","exit","--port", "4443", "--target", "http://mint:3338"]
|
||||||
networks:
|
networks:
|
||||||
@ -56,7 +54,6 @@ services:
|
|||||||
entry:
|
entry:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: cmd/nws/Dockerfile
|
|
||||||
command: [ "./nws","entry"]
|
command: [ "./nws","entry"]
|
||||||
container_name: entry
|
container_name: entry
|
||||||
ports:
|
ports:
|
||||||
|
Loading…
Reference in New Issue
Block a user