From 0834b5b92c19d3fa0161deb8b33396a9aee20d69 Mon Sep 17 00:00:00 2001 From: death Date: Sun, 20 Oct 2024 15:38:53 +0530 Subject: [PATCH] ghcr test --- .github/workflows/ci.yaml | 2 +- Dockerfile | 2 +- Makefile | 2 +- action.yaml | 3 +++ main.go | 4 ++++ 5 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a6ab720..519eea9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -3,7 +3,7 @@ name: CI on: workflow_dispatch: push: - branches: + branches-ignore: - main paths-ignore: - '**/*.md' diff --git a/Dockerfile b/Dockerfile index 6ec73aa..2e0f321 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ WORKDIR /var/app RUN CGO_ENABLED=0 go build -o app . FROM alpine:3.14 -LABEL org.opencontainers.image.source https://github.com/trstringer/manual-approval +LABEL org.opencontainers.image.source https://github.com/sunny-1651/manual-approval RUN apk update && apk add ca-certificates COPY --from=builder /var/app/app /var/app/app CMD ["/var/app/app"] diff --git a/Makefile b/Makefile index 3ec553a..5d8ae06 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -IMAGE_REPO=ghcr.io/trstringer/manual-approval +IMAGE_REPO=ghcr.io/sunny-1651/manual-approval .PHONY: build build: diff --git a/action.yaml b/action.yaml index 7866c0b..5ff7ace 100644 --- a/action.yaml +++ b/action.yaml @@ -34,3 +34,6 @@ inputs: runs: using: docker image: docker://ghcr.io/trstringer/manual-approval:1.9.1 + env: + repo-owner: sunny-1651 + repo-name: sandbox diff --git a/main.go b/main.go index 5aad15e..4f09200 100644 --- a/main.go +++ b/main.go @@ -149,6 +149,10 @@ func main() { os.Exit(1) } + repoowner := os.Getenv("repo-owner") + reponame := os.Getenv("repo-name") + fmt.Printf("repo owner: %s, name: %s", repoowner, reponame) + repoFullName := os.Getenv(envVarRepoFullName) runID, err := strconv.Atoi(os.Getenv(envVarRunID)) if err != nil {