mirror of
https://github.com/MedzikUser/docker-android-sdk
synced 2024-08-15 03:18:15 +00:00
Compare commits
4 commits
cccb7feb83
...
f19d57b956
Author | SHA1 | Date | |
---|---|---|---|
f19d57b956 | |||
a746a54e53 | |||
e3afd1f37d | |||
187af39838 |
2 changed files with 22 additions and 58 deletions
35
.github/workflows/docker-publish.yml
vendored
35
.github/workflows/docker-publish.yml
vendored
|
@ -11,7 +11,7 @@ on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
archlinux:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
@ -25,29 +25,24 @@ jobs:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Login to GitHub Container Registry
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.repository_owner }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build and push Docker image (archlinux)
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
context: archlinux
|
context: archlinux
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
tags: medzik/android-sdk:archlinux
|
tags: |
|
||||||
|
medzik/android-sdk:archlinux
|
||||||
|
ghcr.io/medzikuser/android-sdk:archlinux
|
||||||
|
|
||||||
ubuntu:
|
- name: Build and push Docker image (ubuntu)
|
||||||
needs: archlinux
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Login to DockerHub
|
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
uses: docker/login-action@v1
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Build and push Docker image
|
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
context: ubuntu
|
context: ubuntu
|
||||||
|
@ -55,3 +50,5 @@ jobs:
|
||||||
tags: |
|
tags: |
|
||||||
medzik/android-sdk:ubuntu
|
medzik/android-sdk:ubuntu
|
||||||
medzik/android-sdk:latest
|
medzik/android-sdk:latest
|
||||||
|
ghcr.io/medzikuser/android-sdk:ubuntu
|
||||||
|
ghcr.io/medzikuser/android-sdk:latest
|
||||||
|
|
|
@ -3,42 +3,9 @@ FROM medzik/archlinux:latest
|
||||||
WORKDIR /home/build
|
WORKDIR /home/build
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
RUN sudo pacman -Sy --noconfirm \
|
RUN pacman -Sy --noconfirm \
|
||||||
jdk11-openjdk \
|
android-platform \
|
||||||
&& yes | sudo pacman -Scc
|
android-sdk-platform-tools \
|
||||||
|
android-sdk-cmdline-tools-latest \
|
||||||
# Install cmdline tools
|
android-sdk-build-tools && \
|
||||||
RUN git clone https://aur.archlinux.org/android-sdk-cmdline-tools-latest.git \
|
yes | pacman -Scc
|
||||||
&& cd android-sdk-cmdline-tools-latest \
|
|
||||||
&& makepkg -sr --noconfirm \
|
|
||||||
&& sudo pacman -U ./*.pkg.tar* --noconfirm \
|
|
||||||
&& cd .. \
|
|
||||||
&& rm -rf android-sdk-cmdline-tools-latest \
|
|
||||||
&& yes | sudo pacman -Scc
|
|
||||||
|
|
||||||
# Install platform tools
|
|
||||||
RUN git clone https://aur.archlinux.org/android-sdk-platform-tools.git \
|
|
||||||
&& cd android-sdk-platform-tools \
|
|
||||||
&& makepkg -sr --noconfirm \
|
|
||||||
&& sudo pacman -U ./*.pkg.tar* --noconfirm \
|
|
||||||
&& cd .. \
|
|
||||||
&& rm -rf android-sdk-platform-tools \
|
|
||||||
&& yes | sudo pacman -Scc
|
|
||||||
|
|
||||||
# Install platform
|
|
||||||
RUN git clone https://aur.archlinux.org/android-platform.git \
|
|
||||||
&& cd android-platform \
|
|
||||||
&& makepkg -sr --noconfirm \
|
|
||||||
&& sudo pacman -U ./*.pkg.tar* --noconfirm \
|
|
||||||
&& cd .. \
|
|
||||||
&& rm -rf android-platform \
|
|
||||||
&& yes | sudo pacman -Scc
|
|
||||||
|
|
||||||
# Install build tools
|
|
||||||
RUN git clone https://aur.archlinux.org/android-sdk-build-tools.git \
|
|
||||||
&& cd android-sdk-build-tools \
|
|
||||||
&& makepkg -sr --noconfirm \
|
|
||||||
&& sudo pacman -U ./*.pkg.tar* --noconfirm \
|
|
||||||
&& cd .. \
|
|
||||||
&& rm -rf android-sdk-build-tools \
|
|
||||||
&& yes | sudo pacman -Scc
|
|
||||||
|
|
Loading…
Reference in a new issue