From ef55b8f9f23f903d917b4d61ae42ab2599b3bb53 Mon Sep 17 00:00:00 2001 From: aronwk-aaron Date: Sat, 31 Dec 2022 19:20:16 -0600 Subject: [PATCH] update to ci --- .../{create-and-publish.yml => ci.yml} | 30 +++++++++++-------- README.md | 6 ++-- 2 files changed, 21 insertions(+), 15 deletions(-) rename .github/workflows/{create-and-publish.yml => ci.yml} (65%) diff --git a/.github/workflows/create-and-publish.yml b/.github/workflows/ci.yml similarity index 65% rename from .github/workflows/create-and-publish.yml rename to .github/workflows/ci.yml index 1fdbd05..30ff0ba 100644 --- a/.github/workflows/create-and-publish.yml +++ b/.github/workflows/ci.yml @@ -1,17 +1,14 @@ -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - -# GitHub recommends pinning actions to a commit SHA. -# To get a newer version, you will need to update the SHA. -# You can also reference a tag or branch, but the action may change without warning. - -name: Create and publish a Docker image +name: ci on: push: - branches: ['main'] + branches: + - "**" + tags: + - "v*.*.*" + pull_request: + branches: + - "main" env: REGISTRY: ghcr.io @@ -40,11 +37,20 @@ jobs: uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + # generate Docker tags based on the following events/attributes + tags: | + type=ref,event=branch + type=ref,event=pr + type=raw,value=latest,enable={{is_default_branch}} + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + type=sha - name: Build and push Docker image uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc with: context: . - push: true + push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/README.md b/README.md index 77c1896..a2950a4 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ docker run -d \ # you can include other optional Environment Variables from below like this -e REQUIRE_PLAY_KEY=True -p 8000:8000/tcp - -v /path/to/unpacked/client:/app/luclient:rw \ + -v /path/to/unpacked/client:/app/luclient:r \ -v /path/to/cachedir:/app/cache:rw \ aronwk/nexus-dashboard:latest ``` @@ -248,12 +248,12 @@ Run the following command to clone the repository `git clone https://github.com/ You should now have a directory called `NexusDashboard` present on your desktop. -### Setting up +### Setting up Now that we have the repository cloned you need to rename the example settings file, you can perform this manually in the GUI or you can use the command line, to do the latter run the following commands * `cd NexusDashboard\app` * `copy settings_example.py settings.py` -Now let's open the settings file we just created and configure some of the settings with the Windows default notepad. +Now let's open the settings file we just created and configure some of the settings with the Windows default notepad. * `notepad settings.py` Inside this file is where you can change certain settings like user registration, email support and other things. In this tutorial we will only be focusing on the bare minimum to get up and running, but feel free to adjust what you would like to fit your needs.