From cdd63fc5e2a02d57b1a402329c2490ae30c8c128 Mon Sep 17 00:00:00 2001 From: Vinicius Mayrink Date: Fri, 28 Jun 2024 11:36:31 -0300 Subject: [PATCH] Adding docker file and workflow to push dev docker image to gh registry --- .github/workflows/dev-env.yml | 31 +++++++++++++++++++++++++++++++ Dockerfile | 15 +++++++++++++++ README.md | 13 +++++++++---- install-linux-debian.sh | 0 4 files changed, 55 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/dev-env.yml create mode 100644 Dockerfile mode change 100755 => 100644 install-linux-debian.sh diff --git a/.github/workflows/dev-env.yml b/.github/workflows/dev-env.yml new file mode 100644 index 0000000..9a6a6c8 --- /dev/null +++ b/.github/workflows/dev-env.yml @@ -0,0 +1,31 @@ +name: Development environment workflow + +on: + push: + branches: [ "main" ] + paths: ["Dockerfile"] + +jobs: + publish-image: + needs: ci + runs-on: ubuntu-latest + permissions: + contents: write + packages: write + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Log in to the Container registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v5 + with: + push: true + tags: | + ghcr.io/vncsmyrnk/rust-17.9-slim-dev:latest diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a605a45 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM ubuntu:22.04 +SHELL ["/bin/bash", "-c"] +RUN <> /etc/sudoers +EOF +USER dev +RUN <