desktop-environment/.github/workflows/build-and-publish.yml
Jackson Delahunt dfbf3d9199 env
2020-11-17 00:31:41 +11:00

29 lines
1.1 KiB
YAML

name: Publish Desktop Environment
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
- 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
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: Run desktop environment tests
run: ./docker/scripts/test.sh
env:
DESKTOP_ENVIRONMENT_REGISTRY: ghcr.io/${{ env.REPOSITORY_OWNER }}
continue-on-error: true