Skip to content

Commit

Permalink
fix: Checkout release tag and remove sudo for building images. (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaiwalyajoshi authored Jan 10, 2024
1 parent 0405884 commit 6d3546e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ jobs:
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
uses: actions/checkout@v4
with:
fetch-tags: true
- name: get go version
run: go version
- name: Login to GHCR
Expand All @@ -97,7 +99,7 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Pushing docker images
run: sudo make push
run: make push
- name: Uploading binary files
uses: actions/upload-artifact@v2
with:
Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/d2iq-relesae-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ name: Publish Release
# on events
on:
workflow_dispatch:
inputs:
releaseTag:
description: 'Existing Tag to checkout.'
type: string
required: true
default: ''

# jobs to run
jobs:
Expand All @@ -24,18 +30,21 @@ jobs:
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: Check out release tag
uses: actions/checkout@v4
with:
ref: ${{ inputs.releaseTag }}
fetch-tags: true
- 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
run: make push
- name: Uploading binary files
uses: actions/upload-artifact@v2
with:
Expand Down

0 comments on commit 6d3546e

Please sign in to comment.