-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
transmission version: check with SHA & allow git push to trigger buil…
…d workflow (#2843) * transmission version: check with SHA & allow git push to trigger build workflow * Create transmission-sha.txt * update SHA for 4.0.6 * Create build-version.txt * trigger Image Builds action on completion of Transmission Builds action * Image Builds: ignore unnecessary paths * transmission-version: revert to 4.0.5 for testing * build-version: revert to 4.0.5 for testing * transmission-sha: revert to 4.0.5 for testing
- Loading branch information
1 parent
d199602
commit 5a7bb95
Showing
6 changed files
with
34 additions
and
4 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 |
---|---|---|
|
@@ -12,16 +12,20 @@ jobs: | |
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.PAT }} | ||
ref: dev | ||
|
||
- name: Check for new version of Transmission | ||
run: | | ||
LATEST_VERSION=$(curl -L https://api.github.com/repos/transmission/transmission/releases/latest | grep tag_name | awk '{print $2}' | sed -e 's/"//g' -e 's/,//') | ||
CURRENT_VERSION=$(cat upstream/transmission-version.txt) | ||
if [ "$LATEST_VERSION" != "$CURRENT_VERSION" ]; then | ||
LATEST_SHA=$(curl -L https://api.github.com/repos/transmission/transmission/tags | tac | tac | awk '/sha/ {print $2; exit}' | sed -e 's/[",]//g') | ||
LATEST_VERSION=$(curl -L https://api.github.com/repos/transmission/transmission/releases/latest | awk '/tag_name/ {print $2}' | sed -e 's/[",]//g') | ||
CURRENT_SHA=$(cat upstream/transmission-sha.txt) | ||
if [ "$LATEST_SHA" != "$CURRENT_SHA" -a -n "$LATEST_SHA" -a -n "$LATEST_VERSION" ]; then | ||
echo "$LATEST_SHA" > upstream/transmission-sha.txt | ||
echo "$LATEST_VERSION" > upstream/transmission-version.txt | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "workflow runner" | ||
git add upstream/transmission-sha.txt | ||
git add upstream/transmission-version.txt | ||
git config user.email "[email protected]" | ||
git config user.name "Transmission-Bot" | ||
|
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 |
---|---|---|
|
@@ -14,6 +14,9 @@ jobs: | |
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.PAT }} | ||
ref: dev | ||
|
||
# Get latest version of Transmission | ||
- name: Get Transmission version | ||
|
@@ -58,3 +61,14 @@ jobs: | |
labels: ${{ steps.meta.outputs.labels }} | ||
cache-from: type=gha, scope=${{ github.workflow }} | ||
cache-to: type=gha, scope=${{ github.workflow}} | ||
|
||
- name: Update build-version.txt | ||
run: | | ||
echo "$LATEST_VERSION" > upstream/build-version.txt | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "workflow runner" | ||
git add upstream/build-version.txt | ||
git config user.email "[email protected]" | ||
git config user.name "Transmission-Bot" | ||
git commit -m "update image build version to ${LATEST_VERSION}" | ||
git push origin dev |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
4.0.5 |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
a6fe2a64aa7eca089f96006cf082a12f0cde937f |
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 +1 @@ | ||
4.0.6 | ||
4.0.5 |