Skip to content

Commit

Permalink
fix: Add a manual release workflow and fix CI workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
kaiwalyajoshi committed Jan 9, 2024
1 parent 9d707c8 commit bd3313d
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 3 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: CI

# on events
on:
workflow_dispatch:
push:
branches:
- master
Expand Down Expand Up @@ -70,14 +69,27 @@ jobs:
run: sudo make test-e2e
publish:
name: Publish docker image
runs-on:
- ubuntu-latest
permissions:
contents: read
packages: write
runs-on:
- ubuntu-latest
needs: build
if: github.event_name == 'release' && github.event.action == 'created'
steps:
- name: Set up Go 1.21
uses: actions/setup-go@v2
with:
go-version: "1.21"
id: go
- name: Set up Go for root
run: |
sudo ln -sf `which go` `sudo which go` || true
sudo go version
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: get go version
run: go version
- name: Login to GHCR
uses: docker/login-action@v3
with:
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/d2iq-relesae-images.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# workflow name
name: Publish Release

# on events
on:
workflow_dispatch:

# jobs to run
jobs:
publish:
name: Publish docker image
runs-on:
- ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Set up Go 1.21
uses: actions/setup-go@v2
with:
go-version: "1.21"
id: go
- name: Set up Go for root
run: |
sudo ln -sf `which go` `sudo which go` || true
sudo go version
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: get go version
run: go version
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Pushing docker images
run: sudo make push
- name: Uploading binary files
uses: actions/upload-artifact@v2
with:
name: zookeeper-exporter
path: bin/zookeeper-exporter*

0 comments on commit bd3313d

Please sign in to comment.