diff --git a/.github/workflows/docker-image-dev.yml b/.github/workflows/docker-image-dev.yml new file mode 100644 index 0000000..0c8962c --- /dev/null +++ b/.github/workflows/docker-image-dev.yml @@ -0,0 +1,41 @@ +name: Publish dev Docker image + +on: + push: + branches: [ "master" ] + +jobs: + push_to_registry: + name: Push Docker image to Docker Hub + runs-on: ubuntu-latest + steps: + - name: Set current date as env variable + run: echo "NOW=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_ENV + + - name: Check out the repo + uses: actions/checkout@v4 + + - name: Log in to Docker Hub + uses: docker/login-action@v3.0.0 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5.5.1 + with: + images: drikqlis/dagonite-empire + flavor: | + latest=false + prefix=dev.${{ env.NOW }}- + suffix= + + - name: Build and push Docker image + uses: docker/build-push-action@v5.1.0 + with: + context: . + file: ./DagoniteEmpire/Dockerfile + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/README.md b/README.md index 2878889..1b77772 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,9 @@ A comprehensive tool for starting an online, text-based RPG campaign, enabling m Application database is made on PostGreSQL. ## 🎲 Try it yourself -You can access development version of deployed application here: -[dagonite-empire.drik.it](https://dagonite-empire.drik.it) +You can access release and development version of the application here: + - Release: [dagonite-empire.drik.it](https://dagonite-empire.drik.it) + - Dev: [dagonite-empire-dev.drik.it](https://dagonite-empire-dev.drik.it) You can use default test users or create your own account.