File tree Expand file tree Collapse file tree 2 files changed +22
-7
lines changed
Expand file tree Collapse file tree 2 files changed +22
-7
lines changed Original file line number Diff line number Diff line change 4343 publish : pnpm ci:publish
4444 title : ' chore: publish new package versions'
4545 env :
46- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
46+ GITHUB_TOKEN : ${{ secrets.OLEKSII_PAT_TOKEN_FOR_DOCKERHUB_RELEASE_WORKFLOW }}
4747 HEX_API_KEY : ${{ secrets.HEX_API_KEY }}
4848 - name : Add latest tag to published packages
4949 if : steps.changesets.outputs.published == 'true'
Original file line number Diff line number Diff line change 44 push :
55 branches : ['main']
66 release :
7- released :
7+ types : [released]
8+ workflow_dispatch :
9+ inputs :
10+ release_tag :
11+ description : ' The @core/sync-service@... tag to run for (e.g. @core/sync-service@v1.2.10)'
12+ required : true
13+ type : string
814
915jobs :
1016 derive_build_vars :
@@ -17,11 +23,20 @@ jobs:
1723 steps :
1824 - uses : actions/checkout@v4
1925 with :
20- # It is crucial that we checkout the actual HEAD commit of the branch instead of
21- # GitHub's ephemeral merge commit that it creates for CI runs by default.
22- # We rely on the correct HEAD commit to be checked out in order to determine the
23- # correct ELECTRIC_VERSION to bake into the Docker image.
24- ref : ${{ github.event.pull_request.head.sha }}
26+ # The checked out commit influences the value of the ELECTRIC_VERSION variable
27+ # that is baked into the Docker image.
28+ #
29+ # For regular pushes to main, we check out the HEAD commit and publish canary images.
30+ #
31+ # For releases we check out the tag corresponding to the release, e.g.
32+ # @core/sync-service@v1.2.10.
33+ #
34+ # For manual triggers via workflow_dispatch, we check out the tag specified manually
35+ # by the actor.
36+ ref : ${{
37+ github.event_name == 'release' && format('refs/tags/{0}', github.event.release.tag_name) ||
38+ github.event_name == 'workflow_dispatch' && format('refs/tags/{0}', inputs.release_tag) ||
39+ github.sha }}
2540 # Also important to fetch the whole history since otherwise we won't get that tags
2641 # that are required to determine the correct ELECTRIC_VERSION.
2742 fetch-depth : 0
You can’t perform that action at this time.
0 commit comments