Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/changesets_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
publish: pnpm ci:publish
title: 'chore: publish new package versions'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.OLEKSII_PAT_TOKEN_FOR_DOCKERHUB_RELEASE_WORKFLOW }}
HEX_API_KEY: ${{ secrets.HEX_API_KEY }}
- name: Add latest tag to published packages
if: steps.changesets.outputs.published == 'true'
Expand Down
27 changes: 21 additions & 6 deletions .github/workflows/sync_service_dockerhub_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ on:
push:
branches: ['main']
release:
released:
types: [released]
workflow_dispatch:
inputs:
release_tag:
description: 'The @core/sync-service@... tag to run for (e.g. @core/[email protected])'
required: true
type: string

jobs:
derive_build_vars:
Expand All @@ -17,11 +23,20 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
# It is crucial that we checkout the actual HEAD commit of the branch instead of
# GitHub's ephemeral merge commit that it creates for CI runs by default.
# We rely on the correct HEAD commit to be checked out in order to determine the
# correct ELECTRIC_VERSION to bake into the Docker image.
ref: ${{ github.event.pull_request.head.sha }}
# The checked out commit influences the value of the ELECTRIC_VERSION variable
# that is baked into the Docker image.
#
# For regular pushes to main, we check out the HEAD commit and publish canary images.
#
# For releases we check out the tag corresponding to the release, e.g.
# @core/[email protected].
#
# For manual triggers via workflow_dispatch, we check out the tag specified manually
# by the actor.
ref: ${{
github.event_name == 'release' && format('refs/tags/{0}', github.event.release.tag_name) ||
github.event_name == 'workflow_dispatch' && format('refs/tags/{0}', inputs.release_tag) ||
github.sha }}
# Also important to fetch the whole history since otherwise we won't get that tags
# that are required to determine the correct ELECTRIC_VERSION.
fetch-depth: 0
Expand Down