Skip to content

Commit

Permalink
Fix entrypoint
Browse files Browse the repository at this point in the history
Merge in CI/github-actions-runner from fix/entrypoint to master

* commit 'c05ac74163d558c4e38f36542d7e132bb85814e7':
  fix entrypoint
  • Loading branch information
maximtop committed Apr 26, 2024
2 parents 7375fe6 + c05ac74 commit b61610c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,15 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: "VERSION=${GITHUB_REF##*/}"

- name: Build Docker image without ENTRYPOINT
uses: docker/build-push-action@v5
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}-no-entrypoint
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VERSION=${GITHUB_REF##*/}
WITH_ENTRYPOINT=false
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,9 @@ FROM node:20.12.2-bookworm-slim AS runtime
COPY --from=builder /app/dist/bin/index.js /usr/local/bin/github-actions-runner
RUN chmod +x /usr/local/bin/github-actions-runner

ENTRYPOINT ["github-actions-runner"]
ARG WITH_ENTRYPOINT=true
# Conditionally add ENTRYPOINT based on build argument
RUN if [ "$WITH_ENTRYPOINT" = "true" ]; then \
echo "Adding entrypoint"; \
ENTRYPOINT ["github-actions-runner"]; \
fi
2 changes: 1 addition & 1 deletion bamboo-specs/example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plan:
name: github-actions-runner - example
variables:
# TODO set tag
dockerNode: ghcr.io/adguardteam/githubactionsrunner:master
dockerNode: ghcr.io/adguardteam/githubactionsrunner:latest-no-entrypoint

stages:
- Test:
Expand Down

0 comments on commit b61610c

Please sign in to comment.