Skip to content

Commit

Permalink
ci(autoupdate): improve commit message
Browse files Browse the repository at this point in the history
Keep the same commit message when done manually
  • Loading branch information
rlespinasse committed Oct 22, 2023
1 parent d7c6ac6 commit c8acb72
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Dependencies Auto-Update
name: Autoupdate Drawio Desktop
on:
schedule:
- cron: "0 0 * * 1" # Every Monday at midnight (UTC)
Expand All @@ -7,20 +7,21 @@ permissions:
contents: write
pull-requests: write
concurrency:
group: dependencies-autoupdate
group: autoupdate-drawio-desktop
cancel-in-progress: true
jobs:
autoupdate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: make autoupdate
- run: make autoupdate-drawio-desktop
id: autoupdate-drawio-desktop
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
shell: bash
- uses: peter-evans/create-pull-request@v5
with:
title: "feat: bump dependencies"
branch: dependencies-autoupdate
title: "feat: update to drawio-desktop ${{ steps.autoupdate-drawio-desktop.outputs.release_version }}"
branch: autoupdate-drawio-desktop
reviewers: rlespinasse
token: ${{ secrets.GH_TOKEN }}
12 changes: 5 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: build build-no-cache build-multiarch cleanup run test test-ci-setup test-ci
.PHONY: build build-no-cache build-multiarch cleanup run test test-ci-setup test-ci autoupdate-drawio-desktop

# amd64 by default, arm64 for arm machine like macbook m1
ifneq ($(filter arm%,$(shell uname -p)),)
Expand Down Expand Up @@ -41,11 +41,9 @@ test-ci:
@mkdir -p tests/output
@DOCKER_IMAGE=$(DOCKER_IMAGE) npx bats -r tests

autoupdate:
$(MAKE) autoupdate-drawio-desktop

autoupdate-drawio-desktop:
$(eval DRAWIO_DESKTOP_RELEASE := $(shell gh release list --repo jgraph/drawio-desktop | grep "Latest" | cut -f1))
sed -i 's/DRAWIO_VERSION=.*/DRAWIO_VERSION="$(DRAWIO_DESKTOP_RELEASE)"/' Dockerfile
sed -i 's/Draw\.io Desktop v.*/Draw.io Desktop v$(DRAWIO_DESKTOP_RELEASE)/' README.adoc
@$(eval DRAWIO_DESKTOP_RELEASE := $(shell gh release list --repo jgraph/drawio-desktop | grep "Latest" | cut -f1))
@sed -i 's/DRAWIO_VERSION=.*/DRAWIO_VERSION="$(DRAWIO_DESKTOP_RELEASE)"/' Dockerfile
@sed -i 's/Draw\.io Desktop v.*/Draw.io Desktop v$(DRAWIO_DESKTOP_RELEASE)/' README.adoc
@test -z "${GITHUB_OUTPUT}" || echo "release_version=$(DRAWIO_DESKTOP_RELEASE)" >> "${GITHUB_OUTPUT}"

0 comments on commit c8acb72

Please sign in to comment.