Skip to content

Commit

Permalink
action update release
Browse files Browse the repository at this point in the history
  • Loading branch information
arloor authored Dec 24, 2023
1 parent f7b31d2 commit e331639
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,25 @@ jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: build-and-push
run: |
go mod tidy
CGO_ENABLED=0 go build -ldflags '-w -s' -a -installsuffix cgo -o go_web_server go_web_server/cmd/go_web_server
podman build -f Dockerfile . -t docker.io/arloor/go_web_server:${{ github.sha }} -t docker.io/arloor/go_web_server:latest
podman login docker.io -u arloor -p ${{ env.REGISTRY_PASSWORD }}
podman push docker.io/arloor/go_web_server:${{ github.sha }}
podman push docker.io/arloor/go_web_server:latest
podman push docker.io/arloor/go_web_server:latest
- name: gihub_release
env:
GH_TOKEN: ${{ github.token }}
run: |
if $(gh release delete v1.0.0 -y --cleanup-tag);
then echo "delete old release";
else echo "no old release";
fi
git config --local user.email "[email protected]"
git config --local user.name "arloor"
git tag -f v1.0.0 -m 'latest'
git push --force origin v1.0.0
gh release create v1.0.0 go_web_server --notes-from-tag --latest -t latest

0 comments on commit e331639

Please sign in to comment.