diff --git a/.github/workflows/build-and-publish-from-dotfiles.yml b/.github/workflows/build-and-publish-from-dotfiles.yml new file mode 100644 index 0000000..f25fb46 --- /dev/null +++ b/.github/workflows/build-and-publish-from-dotfiles.yml @@ -0,0 +1,31 @@ +name: Publish Desktop Environment +on: [workflow_dispatch] +jobs: + build: + runs-on: ubuntu-latest + + steps: + + - name: Check out repository + uses: actions/checkout@v2 + + - name: Sanitise Repository Owner + run: echo ::set-env name=REPOSITORY_OWNER::$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]') + + - name: Build and Push to GitHub Container Registry + uses: whoan/docker-build-with-cache-action@master + with: + build_extra_args: --build-arg=DESKTOP_ENVIRONMENT_USER=${{ env.REPOSITORY_OWNER }} --build-arg=DOTFILES_CACHEBUST=${{ github.sha }} + dockerfile: docker/Dockerfile + image_name: desktop-environment + push_git_tag: true + registry: ghcr.io/${{ env.REPOSITORY_OWNER }} + username: ${{ env.REPOSITORY_OWNER }} + password: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + + - name: Run desktop environment tests + run: ./docker/scripts/test.sh + env: + DESKTOP_ENVIRONMENT_REGISTRY: ghcr.io/${{ env.REPOSITORY_OWNER }} + DESKTOP_ENVIRONMENT_CONTAINER_TAG: ${{ github.sha }} + continue-on-error: true diff --git a/docker/Dockerfile b/docker/Dockerfile index da2c121..55b08db 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -214,7 +214,7 @@ RUN git clone --depth 1 https://github.com/sabrehagen/desktop-environment.git /o # Install discord RUN wget -q -O discord.deb "https://discordapp.com/api/download?platform=linux&format=deb" && \ dpkg -i discord.deb || apt-get install -qq --fix-broken && \ - rm discord.deb && echo cachebusts + rm discord.deb # Install dive docker image explorer RUN wget -q -O dive.deb https://github.com/wagoodman/dive/releases/download/v0.7.2/dive_0.7.2_linux_amd64.deb && \