https://github.com/zobaer53/android_ci-cd_docker-image_github-actions_play-store_integration
Android CI/CD: GitHub Actions + Play Store Integration
https://github.com/zobaer53/android_ci-cd_docker-image_github-actions_play-store_integration
android-application ci-cd docker-container github-actions playconsole playstore publishing
Last synced: 3 months ago
JSON representation
Android CI/CD: GitHub Actions + Play Store Integration
- Host: GitHub
- URL: https://github.com/zobaer53/android_ci-cd_docker-image_github-actions_play-store_integration
- Owner: zobaer53
- Created: 2025-03-22T08:24:25.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2025-03-22T08:52:57.000Z (3 months ago)
- Last Synced: 2025-03-22T09:24:51.950Z (3 months ago)
- Topics: android-application, ci-cd, docker-container, github-actions, playconsole, playstore, publishing
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

# Setting Up GitHub Actions CI/CD for Android Apps with Google Play Store Integration Using GitHub Container Registry (GHCR) - Free Tier GuideThis repository contains an Android Calculator App with automated CI/CD using GitHub Actions and GitHub Container Registry (GHCR).
## Features
- Automated Docker image building and publishing to GitHub Container Registry
- Automated Debug APK building on each commit
- Automated release creation with APK attachment when tags are pushed
- Authentication using GitHub repository secrets## Setup Instructions
### 1. Set up Repository Secrets
Before using this workflow, you need to set up the following repository secrets:
1. Go to your repository settings
2. Navigate to "Secrets and variables" → "Actions"
3. Add the following secrets:
- `GHCR_PAT`: A GitHub Personal Access Token with `read:packages`, `write:packages`, and `delete:packages` scopes
- `REGISTRY_URL` (Optional): The registry URL, defaults to `ghcr.io` if not specified### 2. Trigger a Build
The workflow is triggered automatically on:
- Push to the `main` branch
- Pull requests to the `main` branch
- Push of a tag starting with `v` (e.g., `v1.0.0`)
- Manual trigger from the Actions tab### 3. Create a Release
To create a release with the APK attached:
1. Create and push a tag:
```bash
git tag v1.0.0
git push origin v1.0.0
```2. The workflow will automatically:
- Build the Docker image and push it to GHCR
- Build the Debug APK
- Create a GitHub Release with the APK attached## Docker Images
The Docker images are published to GitHub Container Registry and are available at:
```
ghcr.io/[username]/calculatorapp:latest
ghcr.io/[username]/calculatorapp:[commit-sha]
```## Using the Docker Image
You can pull and use the Docker image with:
```bash
# Pull the image
docker pull ghcr.io/[username]/calculatorapp:latest# Build a debug APK
docker run --rm -v $(pwd)/output:/output ghcr.io/[username]/calculatorapp:latest -c "/app/build-apk.sh Debug && cp -r /app/app/build/outputs/apk/debug/* /output/"# Build a release APK
docker run --rm -v $(pwd)/output:/output ghcr.io/[username]/calculatorapp:latest -c "/app/build-apk.sh Release && cp -r /app/app/build/outputs/apk/release/* /output/"
```## Workflow Details
The GitHub Actions workflow:
1. Builds a Docker image using the Dockerfile
2. Pushes the image to GitHub Container Registry
3. Uses the Docker image to build a Debug APK
4. Creates a GitHub Release if a tag is pushed
5. Uploads the APK as an artifactFor more details, see [medium article](https://medium.com/@zobaer53/setting-up-github-actions-ci-cd-for-android-apps-using-github-container-registry-ghcr-f0f5fbea512b).