Skip to content

Commit

Permalink
Add Dockerfile and change inage url from where the image is fetched
Browse files Browse the repository at this point in the history
  • Loading branch information
aravindnswamy committed Feb 8, 2024
1 parent f47eb36 commit 1b74d4a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
28 changes: 28 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
ARG GO_VERSION=1.18-alpine3.15
ARG FROM_IMAGE=alpine:3.15

FROM --platform=${BUILDPLATFORM} golang:${GO_VERSION} AS builder

ARG TARGETOS
ARG TARGETARCH
ARG VERSION

LABEL org.opencontainers.image.source="https://github.com/OpsVerseIO/argocd-sync"

WORKDIR /app

COPY ./ /app

RUN apk update && \
apk add ca-certificates gettext git make curl unzip && \
rm -rf /tmp/* && \
rm -rf /var/cache/apk/* && \
rm -rf /var/tmp/*

RUN make build TARGETOS=$TARGETOS TARGETARCH=$TARGETARCH VERSION=$VERSION

FROM ${FROM_IMAGE}

COPY --from=builder /app/dist/argocd-actions /bin/argocd-actions

ENTRYPOINT ["argocd-actions"]
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ runs:
steps:
- name: Run argocd-actions CLI from the image for GH image registry
run: |
docker run --rm -i ghcr.io/omegion/argocd-actions:${{ inputs.image }} \
docker run --rm -i registry.devopsnow.io/public/argocd-sync-action:${{ inputs.image }} \
${{ inputs.action }} \
--application=${{ inputs.appName }} \
--token=${{ inputs.token }} \
Expand Down

0 comments on commit 1b74d4a

Please sign in to comment.