-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
15 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 |