Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
tprasadtp committed Apr 8, 2024
1 parent 5589f79 commit 3ef9fb8
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 24 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,37 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Shellcheck
run: make shellcheck

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Install GoReleaser
- name: GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
version: latest
install-only: true
args: release --snapshot --clean

- name: Install help2man
run: sudo apt-get install -y help2man
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false

- name: Run GoReleaser
run: make snapshot
- name: Build docker image
run: make docker
23 changes: 10 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@ on:
jobs:
shellcheck:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Shellcheck
run: make shellcheck
build:
runs-on: ubuntu-latest
needs:
- shellcheck
permissions:
contents: write
packages: write
Expand All @@ -29,26 +33,19 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Install GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
version: latest
install-only: true

- name: Install Cosign
uses: sigstore/cosign-installer@v3.4.0

- name: Install help2man
run: sudo apt-get install -y help2man

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Run GoReleaser
run: make release-prod
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: GoReleaser
uses: goreleaser/goreleaser-action@v5
id: goreleaser
with:
version: latest
args: release --clean
12 changes: 11 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,17 @@ release:
skip_upload: true

docker_signs:
- cmd: cosign
- id: images
cmd: cosign
artifacts: images
output: true
args:
- "sign"
- "${artifact}@${digest}"
- --yes

- id: manifests
cmd: cosign
artifacts: manifests
output: true
args:
Expand Down
4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ release: ## Build release
--skip-announce \
--skip-sign

.PHONY: release-prod
release-prod: ## Build release and publish
goreleaser release --clean

.PHONY: clean
clean: ## clean
rm -rf $(REPO_ROOT)/dist/
Expand Down

0 comments on commit 3ef9fb8

Please sign in to comment.