Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Pwa2Apk action fix 🪄 #12

Merged
merged 1 commit into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/actions/pwa2Apk/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM ubuntu
USER root
COPY entrypoint.sh /entrypoint.sh
RUN apt update
RUN apt -y install curl gnupg wget unzip
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash -
RUN chmod +x /entrypoint.sh
RUN apt -y install nodejs
RUN npm install npm@latest -g
RUN npm i -g @bubblewrap/cli
ENTRYPOINT ["/entrypoint.sh"]
17 changes: 17 additions & 0 deletions .github/actions/pwa2Apk/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: 'PWA to APK action'
description: 'Github Action for Converting your PWA to APK.'
branding:
icon: 'package'
color: 'orange'
inputs:
project-root-folder:
description: 'Root folder for project generated by bubblewrap-cli'
required: true
outputs:
message:
description: "Status message from build script"
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.project-root-folder }}
8 changes: 8 additions & 0 deletions .github/actions/pwa2Apk/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh -l

echo "========================= Changing directory to $1 ========================="
cd $1
echo "========================= Building APK, it may take 3-4 minutes or more ========================="
( sleep 5 && while [ 1 ]; do sleep 1; echo y; done ) | bubblewrap build --skipPwaValidation --skipSigning
cp ./*.apk ..
echo "========================= APK building finished ========================="
4 changes: 2 additions & 2 deletions .github/workflows/build_apk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
# Running PWA to apk action for apk generation
- name: Running PWA to APK action
uses: sharadcodes/[email protected]
- name: Running PWA2Apk
uses: ./.github/actions/pwa2Apk
with:
project-root-folder: "."
# This one below is a seperate action which I'm using for releasing apk
Expand Down