mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
chore: prepare-release workflow tweaks (#21833)
This commit is contained in:
parent
ba0cfb76ed
commit
f7acf1886c
2 changed files with 24 additions and 0 deletions
16
.github/workflows/merge-translations.yml
vendored
16
.github/workflows/merge-translations.yml
vendored
|
|
@ -10,6 +10,11 @@ on:
|
||||||
required: true
|
required: true
|
||||||
WEBLATE_TOKEN:
|
WEBLATE_TOKEN:
|
||||||
required: true
|
required: true
|
||||||
|
inputs:
|
||||||
|
skip:
|
||||||
|
description: 'Skip translations'
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
|
||||||
permissions: {}
|
permissions: {}
|
||||||
|
|
||||||
|
|
@ -25,6 +30,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Find translation PR
|
- name: Find translation PR
|
||||||
id: find_pr
|
id: find_pr
|
||||||
|
if: ${{ inputs.skip != true }}
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ github.token }}
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -51,18 +57,21 @@ jobs:
|
||||||
|
|
||||||
- name: Generate a token
|
- name: Generate a token
|
||||||
id: generate_token
|
id: generate_token
|
||||||
|
if: ${{ inputs.skip != true }}
|
||||||
uses: actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b # v2.1.1
|
uses: actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b # v2.1.1
|
||||||
with:
|
with:
|
||||||
app-id: ${{ secrets.PUSH_O_MATIC_APP_ID }}
|
app-id: ${{ secrets.PUSH_O_MATIC_APP_ID }}
|
||||||
private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }}
|
private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }}
|
||||||
|
|
||||||
- name: Lock weblate
|
- name: Lock weblate
|
||||||
|
if: ${{ inputs.skip != true }}
|
||||||
env:
|
env:
|
||||||
WEBLATE_TOKEN: ${{ secrets.WEBLATE_TOKEN }}
|
WEBLATE_TOKEN: ${{ secrets.WEBLATE_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
curl --fail-with-body -X POST -H "Authorization: Token $WEBLATE_TOKEN" "$WEBLATE_HOST/api/components/$WEBLATE_COMPONENT/lock/" -d lock=true
|
curl --fail-with-body -X POST -H "Authorization: Token $WEBLATE_TOKEN" "$WEBLATE_HOST/api/components/$WEBLATE_COMPONENT/lock/" -d lock=true
|
||||||
|
|
||||||
- name: Commit translations
|
- name: Commit translations
|
||||||
|
if: ${{ inputs.skip != true }}
|
||||||
env:
|
env:
|
||||||
WEBLATE_TOKEN: ${{ secrets.WEBLATE_TOKEN }}
|
WEBLATE_TOKEN: ${{ secrets.WEBLATE_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -71,6 +80,7 @@ jobs:
|
||||||
|
|
||||||
- name: Merge PR
|
- name: Merge PR
|
||||||
id: merge_pr
|
id: merge_pr
|
||||||
|
if: ${{ inputs.skip != true }}
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
|
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
|
||||||
PR_NUMBER: ${{ steps.find_pr.outputs.PR_NUMBER }}
|
PR_NUMBER: ${{ steps.find_pr.outputs.PR_NUMBER }}
|
||||||
|
|
@ -83,6 +93,7 @@ jobs:
|
||||||
gh pr merge "$PR_NUMBER" --repo "$GITHUB_REPOSITORY" --auto --squash
|
gh pr merge "$PR_NUMBER" --repo "$GITHUB_REPOSITORY" --auto --squash
|
||||||
|
|
||||||
- name: Wait for PR to merge
|
- name: Wait for PR to merge
|
||||||
|
if: ${{ inputs.skip != true }}
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
|
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
|
||||||
PR_NUMBER: ${{ steps.find_pr.outputs.PR_NUMBER }}
|
PR_NUMBER: ${{ steps.find_pr.outputs.PR_NUMBER }}
|
||||||
|
|
@ -106,7 +117,12 @@ jobs:
|
||||||
exit 1
|
exit 1
|
||||||
|
|
||||||
- name: Unlock weblate
|
- name: Unlock weblate
|
||||||
|
if: ${{ inputs.skip != true }}
|
||||||
env:
|
env:
|
||||||
WEBLATE_TOKEN: ${{ secrets.WEBLATE_TOKEN }}
|
WEBLATE_TOKEN: ${{ secrets.WEBLATE_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
curl --fail-with-body -X POST -H "Authorization: Token $WEBLATE_TOKEN" "$WEBLATE_HOST/api/components/$WEBLATE_COMPONENT/lock/" -d lock=false
|
curl --fail-with-body -X POST -H "Authorization: Token $WEBLATE_TOKEN" "$WEBLATE_HOST/api/components/$WEBLATE_COMPONENT/lock/" -d lock=false
|
||||||
|
|
||||||
|
- name: Report success
|
||||||
|
run: |
|
||||||
|
echo "Workflow completed successfully (or was skipped)"
|
||||||
|
|
|
||||||
8
.github/workflows/prepare-release.yml
vendored
8
.github/workflows/prepare-release.yml
vendored
|
|
@ -10,12 +10,17 @@ on:
|
||||||
type: choice
|
type: choice
|
||||||
options:
|
options:
|
||||||
- 'false'
|
- 'false'
|
||||||
|
- major
|
||||||
- minor
|
- minor
|
||||||
- patch
|
- patch
|
||||||
mobileBump:
|
mobileBump:
|
||||||
description: 'Bump mobile build number'
|
description: 'Bump mobile build number'
|
||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
|
skipTranslations:
|
||||||
|
description: 'Skip translations'
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}-root
|
group: ${{ github.workflow }}-${{ github.ref }}-root
|
||||||
|
|
@ -26,6 +31,8 @@ permissions: {}
|
||||||
jobs:
|
jobs:
|
||||||
merge_translations:
|
merge_translations:
|
||||||
uses: ./.github/workflows/merge-translations.yml
|
uses: ./.github/workflows/merge-translations.yml
|
||||||
|
with:
|
||||||
|
skip: ${{ inputs.skipTranslations }}
|
||||||
permissions:
|
permissions:
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
secrets:
|
secrets:
|
||||||
|
|
@ -35,6 +42,7 @@ jobs:
|
||||||
|
|
||||||
bump_version:
|
bump_version:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs: [merge_translations]
|
||||||
outputs:
|
outputs:
|
||||||
ref: ${{ steps.push-tag.outputs.commit_long_sha }}
|
ref: ${{ steps.push-tag.outputs.commit_long_sha }}
|
||||||
permissions: {} # No job-level permissions are needed because it uses the app-token
|
permissions: {} # No job-level permissions are needed because it uses the app-token
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue