Skip to content

Commit

Permalink
Added vuln fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Jonsy13 <[email protected]>
  • Loading branch information
Jonsy13 committed Jan 9, 2025
1 parent e68b29c commit ae66d24
Showing 1 changed file with 16 additions and 62 deletions.
78 changes: 16 additions & 62 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,76 +1,30 @@
---

name: Release

name: release-pipeline
on:
push:
tags: [ v*.*.* ]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
tags:
- "*"

jobs:
release:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write

steps:
-
name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

-
name: GPG config
run: |
mkdir -p ~/.gnupg
cat << EOF >> ~/.gnupg/options
keyserver keys.openpgp.org
keyserver-options auto-key-retrieve
EOF
-
name: Verify tag signature
run: |
# NOTE: Solve the problem with Github action checkout
# https://github.com/actions/checkout/issues/290
git fetch --tags --force
version=${GITHUB_REF#refs/tags/*}
git show $version
git tag -v $version
-
name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

-
name: Set up Go
uses: actions/setup-go@v3
# Install golang
- uses: actions/setup-go@v2
with:
go-version: 1.23

-
name: Build release changelog
# Checkout to the latest commit
# On specific directory/path
- name: Checkout
uses: actions/checkout@v2

- name: Building toxiproxy
run: |
version=${GITHUB_REF#refs/tags/v*}
mkdir -p tmp
sed '/^# \['$version'\]/,/^# \[/!d;//d;/^\s*$/d' CHANGELOG.md > tmp/release_changelog.md
make prod-build
-
name: Release
uses: goreleaser/goreleaser-action@ff11ca24a9b39f2d36796d1fbd7a4e39c182630a
- name: Release
uses: softprops/action-gh-release@v2
with:
distribution: goreleaser
version: v1.10.3
args: release --rm-dist --release-notes=tmp/release_changelog.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
files: dist/**

0 comments on commit ae66d24

Please sign in to comment.