test-build

This commit is contained in:
Jackson Delahunt 2023-08-23 17:25:10 +10:00
parent c05e14dcb9
commit c90f42ebbc
2 changed files with 15 additions and 8 deletions

View file

@ -8,20 +8,24 @@ jobs:
- name: Check out repository
uses: actions/checkout@v2
- name: Sanitise Repository Owner
- name: Sanitise repository owner
run: echo REPOSITORY_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
- name: Build and Push to GitHub Container Registry
uses: whoan/docker-build-with-cache-action@master
- name: Login to container registry
uses: docker/login-action@v2
with:
build_extra_args: --build-arg=DESKTOP_ENVIRONMENT_USER=${{ env.REPOSITORY_OWNER }} --build-arg=DESKTOP_ENVIRONMENT_GITHUB_USER=${{ env.REPOSITORY_OWNER }}
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: Build and Push to GitHub Container Registry
uses: docker/build-push-action@v4
with:
build-args: --build-arg=DESKTOP_ENVIRONMENT_USER=${{ env.REPOSITORY_OWNER }} --build-arg=DESKTOP_ENVIRONMENT_GITHUB_USER=${{ env.REPOSITORY_OWNER }}
file: docker/Dockerfile
tags: desktop-environment
push_git_tag: true
- name: Run desktop environment tests
run: ./docker/scripts/test.sh
env:

View file

@ -199,7 +199,7 @@ RUN curl -fsSL "https://github.com/docker/compose/releases/download/1.25.0-rc1/d
# Install dunst
RUN apt-get update -qq && \
apt-get install -qq libnotify-dev libxss-dev && \
git clone --depth 1 https://github.com/sabrehagen/dunst /opt/dunst && \
git clone https://github.com/sabrehagen/dunst /opt/dunst && \
cd /opt/dunst && \
make all && \
make install
@ -428,6 +428,9 @@ RUN chown -R $USER:$USER $HOME /opt
USER $USER
WORKDIR $HOME
# Clone the desktop environment
RUN git clone https://github.com/sabrehagen/desktop-environment
# If the DOTFILES_CACHEBUST build arg is supplied, rebuild from static dotfiles onwards
ARG DOTFILES_CACHEBUST
RUN DOTFILES_CACHEBUST=$DOTFILES_CACHEBUST echo "Building from dotfiles..."