Skip to content

Commit

Permalink
Update Github action (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
asmogo authored Aug 28, 2024
1 parent fc4d71c commit 59ff503
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 31 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/master.yml → .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
name: gobuild
name: latest

on:
push:
# run only against tags
tags:
- '*'

branches:
- master
jobs:
docker:
runs-on: ubuntu-latest
Expand Down
42 changes: 20 additions & 22 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,33 @@
name: goreleaser
name: gobuild


on:
push:
# run only against tags
tags:
- '*'

permissions:
contents: write
# packages: write
# issues: write

jobs:
goreleaser:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: git fetch --force --tags
- uses: actions/setup-go@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:
go-version: '>=1.21.2'
cache: true
# More assembly might be required: Docker logins, GPG, etc. It all depends
# on your needs.
- uses: goreleaser/goreleaser-action@v2
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Docker Setup Buildx
uses: docker/[email protected]
- name: Build and push
uses: docker/build-push-action@v3
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
platforms: linux/amd64,linux/arm64
push: true
tags: asmogo/nws:${{github.ref_name}}
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: tests

on: [ push, pull_request ]
on: [ pull_request ]

jobs:
golang:
Expand Down
File renamed without changes.
3 changes: 0 additions & 3 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ services:
exit:
build:
context: .
dockerfile: cmd/nws/Dockerfile
container_name: exit
command: [ "./nws","exit" ]
networks:
Expand All @@ -41,7 +40,6 @@ services:
exit-https:
build:
context: .
dockerfile: cmd/nws/Dockerfile
container_name: exit-https
command: ["./nws","exit","--port", "4443", "--target", "http://mint:3338"]
networks:
Expand All @@ -56,7 +54,6 @@ services:
entry:
build:
context: .
dockerfile: cmd/nws/Dockerfile
command: [ "./nws","entry"]
container_name: entry
ports:
Expand Down

0 comments on commit 59ff503

Please sign in to comment.