Compare commits
5 Commits
b6c405704c
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| d0820de986 | |||
| 53c6d21633 | |||
| d34e41db30 | |||
| 067e0f7009 | |||
| 184b4750f5 |
@@ -0,0 +1,44 @@
|
||||
name: Build and Push Docker Image
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [ published ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Login to Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: gitea.innovativename.xyz
|
||||
username: ${{ secrets.REGISTRY_USER }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Build Docker Image
|
||||
env:
|
||||
RELEASE_TAG: ${{ github.ref_name }}
|
||||
SHORT_HASH: ${{ github.sha }}
|
||||
USER_NAME: cleo
|
||||
run: |
|
||||
# Build the image with the commit hash tag
|
||||
docker build --build-arg BUILD_IDENTIFIER=${SHORT_HASH:0:5} -t gitea.innovativename.xyz/${USER_NAME}/archipelago-server-docker:${RELEASE_TAG} .
|
||||
|
||||
# Tag the same image as "latest"
|
||||
docker tag gitea.innovativename.xyz/${USER_NAME}/archipelago-server-docker:${RELEASE_TAG} gitea.innovativename.xyz/${USER_NAME}/archipelago-server-docker:latest
|
||||
|
||||
- name: Push Docker Images
|
||||
env:
|
||||
RELEASE_TAG: ${{ github.ref_name }}
|
||||
SHORT_HASH: ${{ github.sha }}
|
||||
USER_NAME: cleo
|
||||
run: |
|
||||
docker push gitea.innovativename.xyz/${USER_NAME}/archipelago-server-docker:${RELEASE_TAG}
|
||||
docker push gitea.innovativename.xyz/${USER_NAME}/archipelago-server-docker:latest
|
||||
|
||||
- name: Log out from registry
|
||||
if: always()
|
||||
run: docker logout gitea.innovativename.xyz
|
||||
@@ -9,3 +9,5 @@ Note: The save file needs to be created somewhere else and then put into the mou
|
||||
|
||||
### Env Vars:
|
||||
- `SERVERPASSWORD` -> The password needed to connect to the server
|
||||
- `HOST` -> (optional) The host that the server is supposed to be reachable from
|
||||
- `PASSWORD` -> (optional) The password needed to remotely execute admin commands
|
||||
|
||||
+5
-3
@@ -1,8 +1,10 @@
|
||||
services:
|
||||
server:
|
||||
build: ./
|
||||
image: gitea.innovativename.xyz/cleo/archipelago-server-docker:latest
|
||||
container_name: archipelago_server
|
||||
ports:
|
||||
- 38281:38281
|
||||
volumes:
|
||||
- /srv/archipelago/saves:/home/archipelago/saves
|
||||
env_file: .env
|
||||
- /path/to/saves:/home/archipelago/saves
|
||||
environment:
|
||||
- SERVERPASSWORD=change_me
|
||||
|
||||
Reference in New Issue
Block a user