Gh release workflow for lnproxy binary#20
Open
nir3shprabu wants to merge 25 commits intolnproxy:mainfrom
Open
Conversation
…to dockerize-lnproxy
This reverts commit 64f14f4.
Owner
|
This looks awesome. Sorry, I'm too much of a boomer to properly review this stuff, but from what I can tell it seems extremely solid. If anyone else using lnproxy can comment, it would be helpful. |
0b2c6a4 to
3319d97
Compare
m0wer
suggested changes
May 16, 2025
m0wer
left a comment
There was a problem hiding this comment.
Great additions.
On top of them, added (as a suggestion):
- More up to date versions.
- Removing the insecure commands flag.
- Ensuring security scans are prerequisites for releases.
Needs to be tested.
Comment on lines
+8
to
+69
| permissions: | ||
| contents: write | ||
| id-token: write | ||
| packages: write | ||
| issues: write | ||
| security-events: write | ||
|
|
||
| env: | ||
| GO111MODULE: on | ||
| CGO_ENABLED: 0 | ||
| ACTIONS_ALLOW_UNSECURE_COMMANDS: true | ||
|
|
||
| jobs: | ||
| gosec: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout Source | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Run Gosec Security Scanner | ||
| uses: securego/gosec@master | ||
| with: | ||
| args: ./... | ||
|
|
||
| trivy: | ||
| runs-on: ubuntu-20.04 | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v3 | ||
| - name: Build an image from Dockerfile | ||
| run: | | ||
| docker build -t docker.io/my-organization/my-app:${{ github.sha }} . | ||
| - name: Run Trivy vulnerability scanner | ||
| uses: aquasecurity/trivy-action@master | ||
| with: | ||
| image-ref: 'docker.io/my-organization/my-app:${{ github.sha }}' | ||
| format: 'table' | ||
| exit-code: '1' | ||
| ignore-unfixed: true | ||
| vuln-type: 'os,library' | ||
| severity: 'CRITICAL,HIGH' | ||
|
|
||
| goreleaser: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
|
|
||
| - name: Unshallow | ||
| run: git fetch --prune --unshallow | ||
|
|
||
| - uses: actions/setup-go@v4 | ||
| with: | ||
| go-version: 1.19 | ||
|
|
||
| - uses: goreleaser/goreleaser-action@v4 | ||
| with: | ||
| distribution: goreleaser | ||
| version: latest | ||
| args: release --clean | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
There was a problem hiding this comment.
Suggested change
| permissions: | |
| contents: write | |
| id-token: write | |
| packages: write | |
| issues: write | |
| security-events: write | |
| env: | |
| GO111MODULE: on | |
| CGO_ENABLED: 0 | |
| ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
| jobs: | |
| gosec: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Source | |
| uses: actions/checkout@v3 | |
| - name: Run Gosec Security Scanner | |
| uses: securego/gosec@master | |
| with: | |
| args: ./... | |
| trivy: | |
| runs-on: ubuntu-20.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Build an image from Dockerfile | |
| run: | | |
| docker build -t docker.io/my-organization/my-app:${{ github.sha }} . | |
| - name: Run Trivy vulnerability scanner | |
| uses: aquasecurity/trivy-action@master | |
| with: | |
| image-ref: 'docker.io/my-organization/my-app:${{ github.sha }}' | |
| format: 'table' | |
| exit-code: '1' | |
| ignore-unfixed: true | |
| vuln-type: 'os,library' | |
| severity: 'CRITICAL,HIGH' | |
| goreleaser: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Unshallow | |
| run: git fetch --prune --unshallow | |
| - uses: actions/setup-go@v4 | |
| with: | |
| go-version: 1.19 | |
| - uses: goreleaser/goreleaser-action@v4 | |
| with: | |
| distribution: goreleaser | |
| version: latest | |
| args: release --clean | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: write | |
| id-token: write | |
| packages: write | |
| issues: write | |
| security-events: write | |
| env: | |
| GO111MODULE: on | |
| CGO_ENABLED: 0 | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Source | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.24' | |
| - name: Run Tests | |
| run: go test ./... | |
| gosec: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Source | |
| uses: actions/checkout@v3 | |
| - name: Run Gosec Security Scanner | |
| uses: securego/gosec@master | |
| with: | |
| args: ./... | |
| trivy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Build an image from Dockerfile | |
| run: | | |
| docker build -t ${{ vars.DOCKER_REGISTRY || 'docker.io/my-organization' }}/my-app:${{ github.sha }} . | |
| - name: Run Trivy vulnerability scanner | |
| uses: aquasecurity/trivy-action@master | |
| with: | |
| image-ref: '${{ vars.DOCKER_REGISTRY || 'docker.io/my-organization' }}/my-app:${{ github.sha }}' | |
| format: 'table' | |
| exit-code: '1' | |
| ignore-unfixed: true | |
| vuln-type: 'os,library' | |
| severity: 'CRITICAL,HIGH' | |
| goreleaser: | |
| needs: [test, gosec, trivy] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.24' | |
| - uses: goreleaser/goreleaser-action@v4 | |
| with: | |
| distribution: goreleaser | |
| version: latest | |
| args: release --clean | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Comment on lines
+3
to
+6
| on: | ||
| push: | ||
| tags: | ||
| - 'v*' |
There was a problem hiding this comment.
Tags are not really being used at the moment, at least with the v* format. @lnproxy how do you want to go about this?
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implemented gosec, trivy and goreleaser into this workflow