diff --git a/.github/workflows/ubuntu20-user-wa.yml b/.github/workflows/ubuntu20-user-wa.yml new file mode 100644 index 0000000..d5d7c87 --- /dev/null +++ b/.github/workflows/ubuntu20-user-wa.yml @@ -0,0 +1,42 @@ +name: ubuntu20-user-wa-docker-build + +on: + push: + branches: + - 'main' + tags: + - 'v*' + pull_request: + branches: + - 'main' + +env: + REGISTRY_USER: ${{ github.actor }} + REGISTRY_PASSWORD: ${{ github.token }} + IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }} + +jobs: + + ubuntu-20-user-wa: + runs-on: ubuntu-latest + steps: + + - name: Log in to ghcr.io + uses: redhat-actions/podman-login@v1.6 + with: + username: ${{ env.REGISTRY_USER }} + password: ${{ env.REGISTRY_PASSWORD }} + registry: ${{ env.IMAGE_REGISTRY }} + + - name: Checkout + uses: actions/checkout@v3 + + - uses: mr-smithers-excellent/docker-build-push@v5 + name: Build & push Docker image + with: + image: meta-flutter/ubuntu-20-user-wa + tags: main + registry: ghcr.io + dockerfile: ubuntu-20-user-wa/Dockerfile + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} diff --git a/ubuntu-20-user-wa/Dockerfile b/ubuntu-20-user-wa/Dockerfile new file mode 100644 index 0000000..0731f25 --- /dev/null +++ b/ubuntu-20-user-wa/Dockerfile @@ -0,0 +1,37 @@ +FROM ubuntu:20.04 + +ARG TZ=America/Los_Angeles +ENV DEBIAN_FRONTEND=noninteractive +ARG RUNNER_USER_UID=1001 +ARG DOCKER_GROUP_GID=121 + +USER root + +RUN apt-get update +RUN apt-get install -y locales openssh-client git git-core +RUN apt-get install -y sudo python3 python3-pip python3-git python3-virtualenv + +# Runner user +RUN adduser --disabled-password --gecos '' -u $RUNNER_USER_UID dev \ + && groupadd docker --gid $DOCKER_GROUP_GID \ + && usermod -aG sudo dev \ + && usermod -aG docker dev \ + && echo "%sudo ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers \ + && echo "Defaults env_keep += \"DEBIAN_FRONTEND\"" >> /etc/sudoers + +RUN chown -R dev:dev /home/dev + +RUN locale-gen en_US.UTF-8 +ENV LANG=en_US.UTF-8 + +USER dev + +WORKDIR /home/dev + +# +# Install workspace automation +# +RUN git clone https://github.com/meta-flutter/workspace-automation.git +WORKDIR /home/dev/workspace-automation +ENV PREFER_LLVM=14 +RUN ./flutter_workspace.py