-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' of github.com:SiaFoundation/renterd into its-happe…
…ning
- Loading branch information
Showing
92 changed files
with
4,413 additions
and
2,428 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,12 +10,5 @@ on: | |
|
||
jobs: | ||
add-to-project: | ||
name: Add issue to project | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
# You can target a project in a different organization | ||
# to the issue | ||
project-url: https://github.com/orgs/SiaFoundation/projects/5 | ||
github-token: ${{ secrets.PAT_ADD_TO_PROJECT }} | ||
uses: SiaFoundation/workflows/.github/workflows/project-add.yml@master | ||
secrets: inherit |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,18 @@ | ||
name: Update UI | ||
name: Update UI and open PR | ||
|
||
on: | ||
# Run daily | ||
schedule: | ||
- cron: '0 0 * * *' | ||
repository_dispatch: | ||
types: [update-ui] | ||
# Enable manual trigger | ||
workflow_dispatch: | ||
|
||
jobs: | ||
update-ui: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: '1.21.0' | ||
|
||
- name: Check for new renterd tag in SiaFoundation/web | ||
id: check-tag | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
run: | | ||
# Fetch tags with pagination | ||
TAGS_JSON=$(gh api --paginate repos/SiaFoundation/web/tags) | ||
# Extract tags that start with "renterd/", sort them in version order, and pick the highest version | ||
LATEST_RENTERD_GO_TAG=$(echo "$TAGS_JSON" | jq -r '.[] | select(.name | startswith("renterd/")).name' | sort -Vr | head -n 1) | ||
LATEST_RENTERD_VERSION=$(echo "$LATEST_RENTERD_GO_TAG" | sed 's/renterd\///') | ||
echo "Latest renterd tag is $LATEST_RENTERD_GO_TAG" | ||
echo "GO_TAG=$LATEST_RENTERD_GO_TAG" >> $GITHUB_ENV | ||
echo "VERSION=$LATEST_RENTERD_VERSION" >> $GITHUB_ENV | ||
- name: Fetch release notes for the release | ||
id: release-notes | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
if: env.GO_TAG != 'null' | ||
run: | | ||
RELEASE_TAG_FORMATTED=$(echo "$GO_TAG" | sed 's/\/v/@/') | ||
RELEASES_JSON=$(gh api --paginate repos/SiaFoundation/web/releases) | ||
RELEASE_NOTES=$(echo "$RELEASES_JSON" | jq -r --arg TAG_NAME "$RELEASE_TAG_FORMATTED" '.[] | select(.name == $TAG_NAME).body') | ||
echo "Release notes for $RELEASE_TAG_FORMATTED: $RELEASE_NOTES" | ||
echo "RELEASE_NOTES<<EOF" >> $GITHUB_ENV | ||
echo "$RELEASE_NOTES" >> $GITHUB_ENV | ||
echo "EOF" >> $GITHUB_ENV | ||
- name: Update go.mod with latest module | ||
if: env.GO_TAG != 'null' | ||
run: | | ||
GO_MODULE_FORMATTED=$(echo "$GO_TAG" | sed 's/\//@/') | ||
echo "Updating go.mod to use $GO_MODULE_FORMATTED" | ||
go clean -modcache | ||
go get go.sia.tech/web/$GO_MODULE_FORMATTED | ||
go mod tidy | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v5 | ||
if: env.GO_TAG != 'null' | ||
- name: Update UI and open PR | ||
uses: SiaFoundation/workflows/.github/actions/ui-update@master | ||
with: | ||
moduleName: 'renterd' | ||
goVersion: '1.21' | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
commit-message: "ui: ${{ env.VERSION }}" | ||
title: "ui: ${{ env.VERSION }}" | ||
body: ${{ env.RELEASE_NOTES }} | ||
branch: "ui/update" | ||
delete-branch: true |
This file contains 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
Oops, something went wrong.