Skip to content

Commit

Permalink
Updated multiple documentation READMEs
Browse files Browse the repository at this point in the history
  • Loading branch information
gruberdev committed Mar 29, 2024
1 parent 528592f commit a9f4deb
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 73 deletions.
21 changes: 0 additions & 21 deletions .github/workflows/docs-terraria.yml

This file was deleted.

62 changes: 14 additions & 48 deletions .github/workflows/terraria.yml
Original file line number Diff line number Diff line change
@@ -1,55 +1,21 @@
name: Terraria Container Image

name: Update Terraria Dockerhub metadata
on:
push:
branches:
- main

env:
REGISTRY: ghcr.io

paths:
- servers/terraria/README.md
- .github/workflows/dockerhub-description.yml
jobs:
terraria-image-update:
dockerHubDescription:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Check if Dockerfile has changed
id: changed-dockerfile
uses: tj-actions/changed-files@v35
with:
files: |
servers/terraria/image/Dockerfile
# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
if: steps.changed-dockerfile.outputs.any_changed == 'true'

- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.GH_USER }}
password: ${{ secrets.GH_TOKEN }}

- name: Extract TERRARIA_VERSION from Dockerfile
if: steps.changed-dockerfile.outputs.any_changed == 'true'
id: terraria_version
run: |
TERRARIA_VERSION=$(grep "ARG TERRARIA_VERSION" ./servers/terraria/image/Dockerfile | cut -d'=' -f2)
echo "TERRARIA_VERSION=$TERRARIA_VERSION"
echo "TERRARIA_VERSION=$TERRARIA_VERSION" >> $GITHUB_ENV
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
if: steps.changed-dockerfile.outputs.any_changed == 'true'
id: build-and-push
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
with:
context: ./servers/terraria/image
push: true
tags: ghcr.io/${{ github.repository_owner }}/terraria:v${{ env.TERRARIA_VERSION }}
cache-from: type=gha
cache-to: type=gha,mode=max
- uses: actions/checkout@v3
- name: Update Dockerhub description
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
repository: grubertech/terraria
short-description: Terraria dedicated server image with Agones integration
readme-filepath: ./servers/terraria/README.md
11 changes: 7 additions & 4 deletions servers/factorio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ task factorio:help

---

## Environment Variables
<br>
<details>

<summary> <b> Environment Variables (Click to expand)</b> </summary>

| <h4>Variable name</h4> | <h4>**Default Value**</h4> | <h4>**Description**</h4> |
|----------------------------|-------------------|-----------------|
Expand All @@ -59,12 +62,12 @@ task factorio:help
| FCTR_AUTOSAVE_NONBLOCKING | false | Whether non-blocking saving is enabled (highly experimental) |
| FCTR_ADMINS | | A list of case-insensitive usernames that will be promoted immediately |


---
</details>

<br>
<br>

---


#### References

Expand Down

0 comments on commit a9f4deb

Please sign in to comment.