Skip to content

Commit

Permalink
Merge pull request #8 from tideways/automated-update
Browse files Browse the repository at this point in the history
Automatically update versions using GitHub Actions
  • Loading branch information
TimWolla authored Jul 15, 2024
2 parents f966291 + 75ba7d6 commit c7980ce
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Update

on:
push:
branches:
- main
paths:
- '.github/**'
schedule:
- cron: "0 11 * * *"
workflow_dispatch:

permissions:
contents: write

jobs:
update:
name: Update Versions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
- name: Run update.sh.
run: ./update.sh
- name: Commit changes.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -x
go install github.com/planetscale/ghcommit@latest
if ! git diff --quiet daemon/Dockerfile; then
ghcommit -r ${{ github.repository }} \
-b main \
--add daemon/Dockerfile \
--message "Update to tideways-daemon $(awk '$1 == "ENV" && $2 == "TIDEWAYS_DAEMON_VERSION"{print $3}' daemon/Dockerfile)"
fi
if ! git diff --quiet php/Dockerfile; then
ghcommit -r ${{ github.repository }} \
-b main \
--add php/Dockerfile --add php/alpine/Dockerfile \
--message "Update to tideways-php $(awk '$1 == "ENV" && $2 == "TIDEWAYS_PHP_VERSION"{print $3}' php/Dockerfile)"
fi

0 comments on commit c7980ce

Please sign in to comment.