Skip to content

Commit

Permalink
Fix container execution to support Github Actions (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
rymndhng authored Mar 27, 2020
1 parent 86bfeef commit 9fadc4a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@ jobs:
run: make test

- name: Integration Tests
run: ./entrypoint.sh --dry-run
run: bb --main release-on-push-action.core --dry-run
env:
BABASHKA_CLASSPATH: src
INPUT_BUMP_VERSION_SCHEME: minor
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Container Builds
run: docker build . -t rymndhng/release-on-push-action

- name: Container Tests
- name: Container Test
run: docker run -e INPUT_BUMP_VERSION_SCHEME -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_TOKEN rymndhng/release-on-push-action --dry-run
env:
INPUT_BUMP_VERSION_SCHEME: minor
Expand Down
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ FROM borkdude/babashka:0.0.78
WORKDIR /var/src/release-on-push-action

COPY src src
COPY entrypoint.sh entrypoint.sh

ENTRYPOINT [ "./entrypoint.sh" ]
ENV BABASHKA_CLASSPATH /var/src/release-on-push-action/src

ENTRYPOINT [ "bb", "--main", "release-on-push-action.core" ]
2 changes: 0 additions & 2 deletions entrypoint.sh

This file was deleted.

1 change: 1 addition & 0 deletions src/release_on_push_action/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
(defn -main [& args]
(let [_ (println "Starting process...")
context (context-from-env args)
_ (println "Received context" context) ; in github actions the secrets are printed as '***'
_ (println "Fetching related data...")
related-data (fetch-related-data context)]
(when-let [reason (norelease-reason context related-data)]
Expand Down

0 comments on commit 9fadc4a

Please sign in to comment.