forked from factoriotools/factorio-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (33 loc) · 1.31 KB
/
nightly-build-and-sync.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Nightly build
on:
workflow_dispatch:
schedule:
- cron: 35 8 * * *
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Sync
uses: dabreadman/sync-upstream-repo@v1.3.0
with:
upstream_repo: "https://github.com/factoriotools/factorio-docker.git"
upstream_branch: master
downstream_branch: master
token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v4
- name: Build and push
if: ${{ env.DOCKER_USERNAME != '' && env.DOCKER_PASSWORD != '' }}
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
TOKEN: ${{ secrets.TOKEN }}
USERNAME: ${{ secrets.USERNAME }}
GAME_PASSWORD: ${{ secrets.GAME_PASSWORD }}
run: |
sed -i "s|__TOKEN__|${{ secrets.TOKEN }}|g" docker/files/server-settings.json
sed -i "7 s|__TOKEN__|${{ secrets.TOKEN }}|g" docker/files/update-mods.sh
sed -i "s|__USERNAME__|${{ secrets.USERNAME }}|g" docker/files/server-settings.json
sed -i "6 s|__USERNAME__|${{ secrets.USERNAME }}|g" docker/files/update-mods.sh
sed -i "s|__GAME_PASSWORD__|${{ secrets.GAME_PASSWORD }}|g" docker/files/server-settings.json
./custom-build.py