-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated multiple documentation READMEs
- Loading branch information
Showing
3 changed files
with
21 additions
and
73 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters