Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- master
paths:
- buildinfo.json
workflow_call:
# workaround for #526
workflow_dispatch:

Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,32 @@ jobs:
check:
runs-on: ubuntu-latest
if: github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository == 'factoriotools/factorio-docker')
outputs:
updated: ${{ steps.changes.outputs.updated }}

steps:
- name: Checkout
uses: actions/checkout@v6

- name: Save current HEAD
id: before
run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"

- name: Run update script
run: ./update.sh
shell: bash

- name: Check for changes
id: changes
run: |
if [ "$(git rev-parse HEAD)" != "${{ steps.before.outputs.sha }}" ]; then
echo "updated=true" >> "$GITHUB_OUTPUT"
else
echo "updated=false" >> "$GITHUB_OUTPUT"
fi

build:
needs: check
if: needs.check.outputs.updated == 'true'
uses: ./.github/workflows/docker-build.yml
secrets: inherit