Skip to content

Commit

Permalink
feat: Chat ID addition
Browse files Browse the repository at this point in the history
  • Loading branch information
DarthBenro008 committed Aug 21, 2020
1 parent a5c3f9e commit a98eb19
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 16 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
FROM openjdk:8

RUN apt-get install curl
ARG ANDROID_SDK_VERSION=6609375
ENV ANDROID_SDK_ROOT /opt/android-sdk
RUN mkdir -p ${ANDROID_SDK_ROOT}/cmdline-tools && \
wget -q https://dl.google.com/android/repository/commandlinetools-linux-${ANDROID_SDK_VERSION}_latest.zip && \
unzip *tools*linux*.zip -d ${ANDROID_SDK_ROOT}/cmdline-tools && \
rm *tools*linux*.zip
rm *tools*linux*.zip
COPY license_accepter.sh /opt/
RUN chmod +x /opt/license_accepter.sh && /opt/license_accepter.sh $ANDROID_SDK_ROOT
RUN chmod +x /opt/license_accepter.sh && /opt/license_accepter.sh $ANDROID_SDK_ROOT
ADD entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
ENTRYPOINT ["/entrypoint.sh"]
25 changes: 12 additions & 13 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,21 @@ name: "AppBrickie"
description: "To Test and Build a Debug Android App"
author: "hkpdev008@gmail.com"

jobs:
generate-apk:
name: Build Debug Apk
runs-on: ubuntu-18.04
inputs:
chatid:
description: "The Place to send the App"
requried: true

steps:
- uses: actions/checkout@v2
- name: Upload APK
uses: actions/upload-artifact@v2
with:
name: app
path: app/build/outputs/apk/debug/app-debug.apk
outputs:
result:
description: "Result of automated send"

runs:
using: "docker"
image: "Dockerfile"
using: "docker"
image: "Dockerfile"
args:
- ${{inputs.chatid}}

branding:
icon: "play-circle"
color: "gray-dark"
6 changes: 6 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#!/bin/sh -l
bash ./gradlew test --stacktrace
bash ./gradlew assembleDebug --stacktrace
echo $1
output=$(curl --location --request POST 'http://appbrickie.herokuapp.com/api/sendPackage' \
--form 'file=@app/build/outputs/apk/debug/app-debug.apk' \
--form 'id='$1'' \
--form 'msg=Automated File!')
echo "::set-output name=result::$output"

0 comments on commit a98eb19

Please sign in to comment.