Skip to content

Commit a98eb19

Browse files
committed
feat: Chat ID addition
1 parent a5c3f9e commit a98eb19

File tree

3 files changed

+22
-16
lines changed

3 files changed

+22
-16
lines changed

Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
FROM openjdk:8
22

3+
RUN apt-get install curl
34
ARG ANDROID_SDK_VERSION=6609375
45
ENV ANDROID_SDK_ROOT /opt/android-sdk
56
RUN mkdir -p ${ANDROID_SDK_ROOT}/cmdline-tools && \
67
wget -q https://dl.google.com/android/repository/commandlinetools-linux-${ANDROID_SDK_VERSION}_latest.zip && \
78
unzip *tools*linux*.zip -d ${ANDROID_SDK_ROOT}/cmdline-tools && \
8-
rm *tools*linux*.zip
9+
rm *tools*linux*.zip
910
COPY license_accepter.sh /opt/
10-
RUN chmod +x /opt/license_accepter.sh && /opt/license_accepter.sh $ANDROID_SDK_ROOT
11+
RUN chmod +x /opt/license_accepter.sh && /opt/license_accepter.sh $ANDROID_SDK_ROOT
1112
ADD entrypoint.sh /entrypoint.sh
1213
RUN chmod +x /entrypoint.sh
13-
ENTRYPOINT ["/entrypoint.sh"]
14+
ENTRYPOINT ["/entrypoint.sh"]

action.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,21 @@ name: "AppBrickie"
22
description: "To Test and Build a Debug Android App"
33
author: "hkpdev008@gmail.com"
44

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

10-
steps:
11-
- uses: actions/checkout@v2
12-
- name: Upload APK
13-
uses: actions/upload-artifact@v2
14-
with:
15-
name: app
16-
path: app/build/outputs/apk/debug/app-debug.apk
10+
outputs:
11+
result:
12+
description: "Result of automated send"
1713

1814
runs:
19-
using: "docker"
20-
image: "Dockerfile"
15+
using: "docker"
16+
image: "Dockerfile"
17+
args:
18+
- ${{inputs.chatid}}
19+
2120
branding:
2221
icon: "play-circle"
2322
color: "gray-dark"

entrypoint.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
#!/bin/sh -l
22
bash ./gradlew test --stacktrace
33
bash ./gradlew assembleDebug --stacktrace
4+
echo $1
5+
output=$(curl --location --request POST 'http://appbrickie.herokuapp.com/api/sendPackage' \
6+
--form 'file=@app/build/outputs/apk/debug/app-debug.apk' \
7+
--form 'id='$1'' \
8+
--form 'msg=Automated File!')
9+
echo "::set-output name=result::$output"

0 commit comments

Comments
 (0)