Skip to content

Commit

Permalink
fixes workflow action
Browse files Browse the repository at this point in the history
Signed-off-by: Nishant Bansal <[email protected]>
  • Loading branch information
NishantBansal2003 committed Nov 8, 2024
1 parent a858b57 commit df27119
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions .github/workflows/include-kcl-checksums.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
name: Include KCL Modules Checksum

on:
push:
workflow_dispatch:
inputs:
kpm_reg:
description: "Enter the KPM Registry"
required: true
default: "localhost:5001"
kpm_repo:
description: "Enter the KPM Repository"
required: true
default: "test"

jobs:
include_modules_checksum:
Expand All @@ -21,11 +30,19 @@ jobs:
with:
go-version-file: go.mod

- name: Login to GHCR
run: kcl registry login -u ${{ secrets.DEPLOY_ACCESS_NAME }} -p ${{ secrets.DEPLOY_ACCESS_TOKEN }} ghcr.io
- name: Run local registry for localhost
if: ${{ github.event.inputs.kpm_reg == 'localhost:5001' }}
run: ./scripts/reg.sh

- name: Login to registry
run: |
kcl registry login -u ${{ github.event.inputs.kpm_repo }} -p ${{ secrets.REGISTRY_ACCESS_TOKEN }} ${{ github.event.inputs.kpm_reg }}
- name: Get dependencies
run: go get -v ./...

- name: Run include checksum tool
env:
KPM_REG: ${{ github.event.inputs.kpm_reg }}
KPM_REPO: ${{ github.event.inputs.kpm_repo }}
run: go run ./Integrate-Checksum/main.go

0 comments on commit df27119

Please sign in to comment.