Fix sell screen #389
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Docker CI | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| paths: | |
| - "**/Dockerfile" | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| BASE_IMAGE_NAME: gem-android-base | |
| BASE_IMAGE_FULL_NAME: ghcr.io/${{ github.repository_owner }}/gem-android-base | |
| DOCKER_BUILDKIT: 1 | |
| BUNDLE_TASK: "clean :app:bundleGoogleRelease assembleUniversalRelease" | |
| jobs: | |
| build_app_image: | |
| name: Build App Docker Image | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install just | |
| uses: extractions/setup-just@v2 | |
| - name: Create local.properties for CI | |
| run: | | |
| echo "gpr.username=${{ github.actor }}" > local.properties | |
| echo "gpr.token=${{ secrets.GITHUB_TOKEN }}" >> local.properties | |
| echo "# Automatically generated for CI build" >> local.properties | |
| - name: Determine ref to build | |
| id: build_ref | |
| run: | | |
| if [ "${{ github.event_name }}" = "pull_request" ]; then | |
| REF="${{ github.event.pull_request.head.ref }}" | |
| else | |
| REF="${GITHUB_REF_NAME}" | |
| fi | |
| echo "ref=${REF}" >> "$GITHUB_OUTPUT" | |
| echo "Building ref: ${REF}" | |
| - name: Build app image | |
| env: | |
| DOCKER_BUILDKIT: 1 | |
| TAG: ${{ steps.build_ref.outputs.ref }} | |
| run: | | |
| just build-app-image | |
| - name: Build app inside container | |
| env: | |
| GRADLE_CACHE: ${{ runner.temp }}/gradle-cache | |
| MAVEN_CACHE: ${{ runner.temp }}/m2-cache | |
| TAG: ${{ steps.build_ref.outputs.ref }} | |
| run: | | |
| mkdir -p "${GRADLE_CACHE}" "${MAVEN_CACHE}" | |
| GRADLE_CACHE="${GRADLE_CACHE}" MAVEN_CACHE="${MAVEN_CACHE}" \ | |
| just build-app-in-docker |