Skip to content

Commit

Permalink
ghcr test
Browse files Browse the repository at this point in the history
  • Loading branch information
sunny-1651 committed Oct 20, 2024
1 parent d2e412d commit 0834b5b
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI
on:
workflow_dispatch:
push:
branches:
branches-ignore:
- main
paths-ignore:
- '**/*.md'
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
IMAGE_REPO=ghcr.io/trstringer/manual-approval
IMAGE_REPO=ghcr.io/sunny-1651/manual-approval

.PHONY: build
build:
Expand Down
3 changes: 3 additions & 0 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 0834b5b

Please sign in to comment.