desktop-environment/.github/workflows/build-and-publish.yml
Jackson Delahunt 86e306fa9f manual
2020-10-18 15:38:35 +11:00

29 lines
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 ::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 }}
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