fix: added Readme and-readded docker build steps #10
This file contains hidden or 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
| name: Nightly | |
| on: | |
| push: | |
| branches: | |
| - "main" | |
| - "feature/*" | |
| pull_request: | |
| branches: [ "main" ] | |
| schedule: | |
| - cron: '0 0 * * *' # This cron expression schedules the workflow to run every day at midnight UTC | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| steamcmd_version: ${{ steps.get_version.outputs.steamcmd_version }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Log in to the Container registry | |
| uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUBTOKEN }} | |
| - name: Extract metadata (tags, labels) for Docker | |
| id: meta | |
| uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 | |
| with: | |
| images: ghcr.io/gameservercentral/steamcmd-docker | |
| - name: Extract Satisfactory buildID | |
| id: get_manifest | |
| run: | | |
| sudo apt update | |
| sudo apt install -y wget ca-certificates lib32gcc-s1 | |
| mkdir -p ~/steamcmd | |
| wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz -O ~/steamcmd/steamcmd_linux.tar.gz | |
| tar -xzf ~/steamcmd/steamcmd_linux.tar.gz -C ~/steamcmd | |
| mkdir -p ~/.steam | |
| echo "@SteamCmdForceLicense=1" > ~/.steam/steamcmd.cfg | |
| manifest=$(~/steamcmd/steamcmd.sh +login anonymous +app_info_print 1690800 +quit | awk '/"public"/,/\}/ {if ($1 == "\"buildid\"") print $2}' | head -n1 | sed 's/"//g') | |
| echo "Manifest ID: $manifest" | |
| echo "::set-output name=manifest_id::$manifest" | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc | |
| with: | |
| context: . | |
| push: ${{ github.event_name != 'pull_request' }} | |
| tags: | | |
| ghcr.io/gameservercentral/satisfactory:latest | |
| ghcr.io/gameservercentral/satisfactory:nightly | |
| ghcr.io/gameservercentral/satisfactory:${{ steps.get_manifest.outputs.manifest_id }} | |
| labels: ${{ steps.meta.outputs.labels }} |