Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
188 commits
Select commit Hold shift + click to select a range
bb9ce95
First branch manipulation implementation
Peter-Sh Jul 31, 2025
bced1da
Fix workflow
Peter-Sh Jul 31, 2025
36d63fc
Fix yaml
Peter-Sh Jul 31, 2025
6d12d22
Fix path to actions
Peter-Sh Jul 31, 2025
d067295
Fix push empty branches
Peter-Sh Jul 31, 2025
b82ea9d
Use different runner
Peter-Sh Jul 31, 2025
32823d7
Pretty output
Peter-Sh Jul 31, 2025
efe9b17
Fix execut command
Peter-Sh Jul 31, 2025
68817c7
Use common base
Peter-Sh Aug 1, 2025
3041ccd
Add validate archive action
Peter-Sh Aug 1, 2025
5637a31
Make executable
Peter-Sh Aug 1, 2025
c17467a
Make curl return error
Peter-Sh Aug 1, 2025
1d00759
Make curl silent
Peter-Sh Aug 1, 2025
a86989c
Try to use pre-merge.yml
Peter-Sh Aug 1, 2025
5f6fccc
allow-modify flag
Peter-Sh Aug 1, 2025
8e1e9ad
Fix workflow
Peter-Sh Aug 1, 2025
b981b62
Fix worflow reuse
Peter-Sh Aug 1, 2025
0786970
Fixed required property type
Peter-Sh Aug 1, 2025
d7507d3
Remove runs-on
Peter-Sh Aug 1, 2025
d3d5043
Add apply-docker-version
Peter-Sh Aug 1, 2025
21faa0e
Use explicit branch name
Peter-Sh Aug 1, 2025
8805777
Branches doesn't work with local versions
Peter-Sh Aug 1, 2025
3a85e67
Add bot name
Peter-Sh Aug 1, 2025
2262399
Try locl config
Peter-Sh Aug 1, 2025
cc1dd2a
Use --author
Peter-Sh Aug 1, 2025
0a7159a
debug output
Peter-Sh Aug 1, 2025
d158d12
Auto merge from release branch
Peter-Sh Aug 1, 2025
a75454e
Push after merge, use helpers
Peter-Sh Aug 1, 2025
f769966
debug output
Peter-Sh Aug 1, 2025
9be223f
Try to use --unshallow
Peter-Sh Aug 1, 2025
49e3112
Try to combine unshallow and not unshallow
Peter-Sh Aug 1, 2025
c7b84a2
Use function to fetch unshallow
Peter-Sh Aug 1, 2025
dec5f36
Set author for merge
Peter-Sh Aug 1, 2025
4e05f49
Fix sha calculation
Peter-Sh Aug 1, 2025
e86576d
Fix ensure branch call when building
Peter-Sh Aug 1, 2025
0174082
Fix ensure branch call when building
Peter-Sh Aug 1, 2025
8ea64de
Try to create verified commit
Peter-Sh Aug 2, 2025
4bb6e39
Push to release_version_branch instead of release_branch
Peter-Sh Aug 2, 2025
0fda96a
Optional workflow_uuid
Peter-Sh Aug 28, 2025
ab10d32
Use run-name
Peter-Sh Aug 28, 2025
8f8e26b
Fix double space
Peter-Sh Aug 28, 2025
87e8b82
Use ghcr.io to push images
Peter-Sh Aug 28, 2025
c3dcc3e
Enable build again for testing
Peter-Sh Aug 28, 2025
d5c2133
Try to fix ghcr.io tag
Peter-Sh Aug 28, 2025
81b938a
Fix release_tag propagation
Peter-Sh Aug 28, 2025
e21a84d
Fix unexpected end of expression
Peter-Sh Aug 28, 2025
f26e8ea
registry tags must be lowercase
Peter-Sh Aug 28, 2025
7db9d66
Step to correctly format registry tag
Peter-Sh Aug 28, 2025
507d27a
Remove unsupported toLower()
Peter-Sh Aug 28, 2025
5276cb9
Fix step shell
Peter-Sh Aug 28, 2025
be7d642
Try verified merge
Peter-Sh Aug 28, 2025
f6de3ed
Fix heredoc
Peter-Sh Aug 28, 2025
b645ce4
Show commits
Peter-Sh Aug 28, 2025
baf14b2
Debug
Peter-Sh Aug 28, 2025
af2fa70
debg
Peter-Sh Aug 28, 2025
bcb994b
Format oneline
Peter-Sh Aug 28, 2025
52f21d9
Remove heredoc
Peter-Sh Aug 28, 2025
04d4b10
debug3
Peter-Sh Aug 28, 2025
0dd9300
debug 4
Peter-Sh Aug 28, 2025
debc6a1
debyg 5
Peter-Sh Aug 28, 2025
3d5e032
Add GITHUB_TOKEN
Peter-Sh Aug 28, 2025
a9e5e25
Pass gh_token
Peter-Sh Aug 28, 2025
e708852
debug 6
Peter-Sh Aug 28, 2025
c266e09
fix tkn
Peter-Sh Aug 28, 2025
4ddc546
debug 7
Peter-Sh Aug 28, 2025
1b671ac
remove set -x
Peter-Sh Aug 28, 2025
8658fa6
Moved verfied merge into function
Peter-Sh Aug 29, 2025
89d5e41
Just a change
Peter-Sh Aug 29, 2025
3a29c1b
Fix arguments parsing
Peter-Sh Aug 29, 2025
f9bedc1
Add second shift
Peter-Sh Aug 29, 2025
71a6362
Fix docker files updating
Peter-Sh Aug 29, 2025
4e317e6
Test modification
Peter-Sh Aug 29, 2025
5aa2d5d
Merge back
Peter-Sh Aug 29, 2025
c4121f6
Enable build
Peter-Sh Aug 29, 2025
d54f8ac
Set execute bit
Peter-Sh Aug 29, 2025
ee242c2
Add debug
Peter-Sh Aug 29, 2025
3e47704
Skip build for debug
Peter-Sh Aug 29, 2025
bda1955
Disable fail on error
Peter-Sh Aug 29, 2025
b6d53ec
Further debug
Peter-Sh Aug 29, 2025
28f1281
Fix merge function and add gh token
Peter-Sh Aug 29, 2025
f6bbb64
Fix env
Peter-Sh Aug 29, 2025
970c2aa
Move reusable actions to redis-oss-release-automation
Peter-Sh Aug 29, 2025
707d66b
Fix actions refs
Peter-Sh Aug 29, 2025
5d1810f
Remove actions that were transerred to release automation
Peter-Sh Aug 29, 2025
68bfae0
Return commented out actions
Peter-Sh Aug 29, 2025
51910ee
Use common from another repo
Peter-Sh Aug 29, 2025
9b9253d
Fix remote action usage instead of local
Peter-Sh Aug 29, 2025
59788b3
Test merge back without changed files
Peter-Sh Aug 29, 2025
d3f4cb6
Return full build
Peter-Sh Aug 29, 2025
a531b37
Prepare stackbrew librirary intermediate commit
Peter-Sh Sep 9, 2025
f6b02de
Support for EOLing versions, fixes and update tests
Peter-Sh Sep 10, 2025
59566b2
Comments and fixes to the shell version
Peter-Sh Sep 11, 2025
bbd49d2
Python release-automation implementation
Peter-Sh Sep 11, 2025
c06c345
Triggering workflow
Peter-Sh Sep 11, 2025
672c2ae
Fix trigger
Peter-Sh Sep 11, 2025
f5d5d0c
Docker for releasr-automation
Peter-Sh Sep 11, 2025
1501da1
Test release-automation docker
Peter-Sh Sep 11, 2025
13648c5
Fix image url
Peter-Sh Sep 11, 2025
3c5896d
Test remote names
Peter-Sh Sep 11, 2025
5b2eb4c
fix
Peter-Sh Sep 11, 2025
ee0636f
fix add to safe directory
Peter-Sh Sep 11, 2025
555d124
Debug output
Peter-Sh Sep 11, 2025
de932b0
Continue debugging
Peter-Sh Sep 11, 2025
a7a9434
Remove env to test
Peter-Sh Sep 11, 2025
7b91991
Removed safe dir
Peter-Sh Sep 11, 2025
ee98238
debug outpu
Peter-Sh Sep 11, 2025
11fced5
Debug output
Peter-Sh Sep 11, 2025
abada29
Add global safe dir and run tests
Peter-Sh Sep 11, 2025
e5cc7b3
Fix docker image
Peter-Sh Sep 11, 2025
50884e5
Try to fix workspace
Peter-Sh Sep 11, 2025
35c8bc8
cd to release-automation for testing
Peter-Sh Sep 11, 2025
7a430bd
Comment
Peter-Sh Sep 11, 2025
f4f91bc
Full stackbrew format support
Peter-Sh Sep 11, 2025
c140a5b
Try interactive mode
Peter-Sh Sep 12, 2025
45aa7b1
Use only -i
Peter-Sh Sep 12, 2025
688c2c3
Try force color
Peter-Sh Sep 12, 2025
1b9bf32
Readme
Peter-Sh Sep 12, 2025
77a5c18
Refactoring the code
Peter-Sh Sep 12, 2025
316f0c4
Temporary disable the build, test tag creation
Peter-Sh Sep 12, 2025
4c0e470
Create tag only if merge was done
Peter-Sh Sep 12, 2025
9faae5f
Debug output
Peter-Sh Sep 12, 2025
0631deb
lilbit dbg
Peter-Sh Sep 12, 2025
c817116
fix dblquoute
Peter-Sh Sep 12, 2025
9d6435d
Remove debug
Peter-Sh Sep 12, 2025
c626c11
Release handle
Peter-Sh Sep 13, 2025
256448c
Rename release_handle
Peter-Sh Sep 13, 2025
8ccb38d
Release publish first run
Peter-Sh Sep 13, 2025
9ab8c8e
Fix push condition
Peter-Sh Sep 13, 2025
2613793
Fix yaml for release_publish workflow
Peter-Sh Sep 13, 2025
3e6e240
Remove push run
Peter-Sh Sep 13, 2025
eb29459
Creating a PR: first attempt
Peter-Sh Sep 13, 2025
2291fee
Fix official images url
Peter-Sh Sep 13, 2025
fd6c12f
Fix update-stackbrew-file args
Peter-Sh Sep 13, 2025
7579472
Swap remotes
Peter-Sh Sep 13, 2025
480669b
Use token for fork
Peter-Sh Sep 13, 2025
8654ea2
Show color diff
Peter-Sh Sep 13, 2025
f33f94a
Add generated output entries
Peter-Sh Sep 13, 2025
4faa3a4
Upload release_info
Peter-Sh Sep 13, 2025
7f38f4e
Increase artifact lifetime, remove unused yaml
Peter-Sh Sep 17, 2025
e7d4b01
Use redis-developer fork, but target personal repo for testing
Peter-Sh Sep 17, 2025
d2af09d
Use personal token for PR
Peter-Sh Sep 17, 2025
800abcb
Fix fork url
Peter-Sh Sep 17, 2025
2de5de1
Add a DRAFT note
Peter-Sh Sep 17, 2025
333a41b
Try syncing fork and pushing to master
Peter-Sh Sep 17, 2025
061bc6b
Revert "Try syncing fork and pushing to master"
Peter-Sh Sep 17, 2025
ad3f9b2
Use official docker for testing
Peter-Sh Sep 17, 2025
35a3180
Collect image urls to release handle
Peter-Sh Sep 17, 2025
9c2abfe
Return to personal repo for testing
Peter-Sh Sep 17, 2025
ab49c2b
Temporary disable some of the architectures
Peter-Sh Sep 17, 2025
688f959
Leave only 2 images
Peter-Sh Sep 17, 2025
b997ae6
Try self-hosted runners
Peter-Sh Sep 17, 2025
a7deb84
Fix image urls
Peter-Sh Sep 17, 2025
c5fa85d
Used scoped layer cache
Peter-Sh Sep 17, 2025
a3a372b
Introduce wait for redis instead of always sleep
Peter-Sh Sep 17, 2025
f5d5e90
Increase timeout
Peter-Sh Sep 17, 2025
9536d72
Really increase timeout
Peter-Sh Sep 17, 2025
47d5c1b
Fix wait for redis: use correct container id
Peter-Sh Sep 17, 2025
c61a6ea
Return official images for demo
Peter-Sh Sep 17, 2025
5a34e94
Add slack notification about image urls
Peter-Sh Sep 18, 2025
af9ca7f
Revert "Return official images for demo"
Peter-Sh Sep 18, 2025
c51ce0d
Reformat slack message
Peter-Sh Sep 18, 2025
18673cc
Slack msg for PR creation
Peter-Sh Sep 18, 2025
13bacc0
Debug output
Peter-Sh Sep 18, 2025
b4675ca
Further debug
Peter-Sh Sep 18, 2025
5db0864
Try using GITHUB_WORKSPACE env
Peter-Sh Sep 18, 2025
fa7c8eb
Use checkout action
Peter-Sh Sep 18, 2025
26177ae
Fix curl execution for slack
Peter-Sh Sep 18, 2025
fa6360b
Use official repo
Peter-Sh Sep 18, 2025
164c124
Proper milestone filtering and tests
Peter-Sh Sep 18, 2025
3468cec
Fix slack footer, return personal target
Peter-Sh Sep 18, 2025
f9da1d4
Fix sort in eol filter, update tests
Peter-Sh Sep 19, 2025
d44b5ea
Change slack msg format for images list
Peter-Sh Sep 19, 2025
7757470
Add mentions and link to changes
Peter-Sh Sep 19, 2025
86b550b
New icon, move user mentions to env
Peter-Sh Sep 19, 2025
800e079
Fix icon and url
Peter-Sh Sep 19, 2025
eedc99d
Test failure
Peter-Sh Sep 19, 2025
8a2aeb0
Fix failure message failure
Peter-Sh Sep 19, 2025
67a485b
Remove bash stackbrew implementation
Peter-Sh Sep 19, 2025
c420598
Test build failure notification
Peter-Sh Sep 19, 2025
e172434
Checkout code for failure notification
Peter-Sh Sep 19, 2025
faa5f5b
Fix tag in build failure message
Peter-Sh Sep 19, 2025
9593d64
Return debian/Dockerfile to original state
Peter-Sh Sep 19, 2025
67d28c7
Removed failure test
Peter-Sh Sep 19, 2025
7672ccc
Align with redis/docker-library-redis
Peter-Sh Sep 19, 2025
dc3a92d
Gitignore for release-automation
Peter-Sh Sep 19, 2025
326142f
Removed draft warning and returned official target and user mentions
Peter-Sh Sep 19, 2025
03cfe48
Comment out duplicate variables
Peter-Sh Sep 19, 2025
8a94c07
Fix url for redis-oss-release-automation
Peter-Sh Sep 19, 2025
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
36 changes: 36 additions & 0 deletions .github/actions/apply-docker-version/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
inputs:
release_tag:
description: 'Release tag to build'
required: true
release_version_branch:
description: 'Release version branch to commit to'
required: true

outputs:
changed_files:
description: 'List of files that were modified'
value: ${{ steps.apply-version.outputs.changed_files }}

runs:
using: "composite"
steps:
- name: Checkout common functions
uses: actions/checkout@v4
with:
repository: redis-developer/redis-oss-release-automation
ref: main
path: redis-oss-release-automation

- name: Apply docker version
id: apply-version
shell: bash
run: |
${{ github.action_path }}/apply-docker-version.sh ${{ inputs.release_tag }}

- name: Create verified commit
if: steps.apply-version.outputs.changed_files != ''
uses: iarekylew00t/verified-bot-commit@v1
with:
message: ${{ inputs.release_tag }}
files: ${{ steps.apply-version.outputs.changed_files }}
ref: ${{ inputs.release_version_branch }}
104 changes: 104 additions & 0 deletions .github/actions/apply-docker-version/apply-docker-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
#!/bin/bash
set -e

# This script updates Redis version in Dockerfiles using environment variables
# REDIS_ARCHIVE_URL and REDIS_ARCHIVE_SHA, then commits changes if any were made.

# shellcheck disable=SC2034
last_cmd_stdout=""
# shellcheck disable=SC2034
last_cmd_stderr=""
# shellcheck disable=SC2034
last_cmd_result=0
# shellcheck disable=SC2034
VERBOSITY=1



SCRIPT_DIR="$(dirname -- "$( readlink -f -- "$0"; )")"
# shellcheck disable=SC1091
. "$SCRIPT_DIR/../common/func.sh"

source_helper_file helpers.sh

# Input TAG is expected in $1
TAG="$1"

if [ -z "$TAG" ]; then
echo "Error: TAG is required as first argument"
exit 1
fi

# Check if required environment variables are set
if [ -z "$REDIS_ARCHIVE_URL" ]; then
echo "Error: REDIS_ARCHIVE_URL environment variable is not set"
exit 1
fi

if [ -z "$REDIS_ARCHIVE_SHA" ]; then
echo "Error: REDIS_ARCHIVE_SHA environment variable is not set"
exit 1
fi

echo "TAG: $TAG"
echo "REDIS_ARCHIVE_URL: $REDIS_ARCHIVE_URL"
echo "REDIS_ARCHIVE_SHA: $REDIS_ARCHIVE_SHA"

# Function to update Dockerfile
update_dockerfile() {
local dockerfile="$1"
local updated=false

if [ ! -f "$dockerfile" ]; then
echo "Warning: $dockerfile not found, skipping"
return 1
fi

echo "Updating $dockerfile..."

# Update REDIS_DOWNLOAD_URL
if grep -q "^ENV REDIS_DOWNLOAD_URL=" "$dockerfile"; then
sed -i "s|^ENV REDIS_DOWNLOAD_URL=.*|ENV REDIS_DOWNLOAD_URL=$REDIS_ARCHIVE_URL|" "$dockerfile"
else
echo "Cannot update $dockerfile, ENV REDIS_DOWNLOAD_URL not found"
return 1
fi


# Update REDIS_DOWNLOAD_SHA
if grep -q "^ENV REDIS_DOWNLOAD_SHA=" "$dockerfile"; then
sed -i "s|^ENV REDIS_DOWNLOAD_SHA=.*|ENV REDIS_DOWNLOAD_SHA=$REDIS_ARCHIVE_SHA|" "$dockerfile"
else
echo "Cannot update $dockerfile, ENV REDIS_DOWNLOAD_SHA not found"
return 1
fi
}

docker_files=("debian/Dockerfile" "alpine/Dockerfile")
# Track which files were modified
changed_files=()

for dockerfile in "${docker_files[@]}"; do
update_dockerfile "$dockerfile"
done

changed_files=($(git diff --name-only "${docker_files[@]}"))

# Output the list of changed files for GitHub Actions
if [ ${#changed_files[@]} -gt 0 ]; then
echo "Files were modified:"
printf '%s\n' "${changed_files[@]}"

# Set GitHub Actions output
changed_files_output=$(printf '%s\n' "${changed_files[@]}")
{
echo "changed_files<<EOF"
echo "$changed_files_output"
echo "EOF"
} >> "$GITHUB_OUTPUT"

echo "Changed files output set for next step"
else
echo "No files were modified"
echo "changed_files=" >> "$GITHUB_OUTPUT"
fi
51 changes: 43 additions & 8 deletions .github/actions/build-and-tag-locally/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ inputs:
registry_repository:
description: 'Repository to push the image to'
required: false
release_tag:
description: 'Release tag to build'
required: false

runs:
using: "composite"
Expand Down Expand Up @@ -95,14 +98,14 @@ runs:
load: true
platforms: ${{ inputs.platform }}
tags: ${{ github.sha }}:${{ steps.platform.outputs.display_name }}
cache-from: type=gha
cache-to: type=gha,mode=max
cache-from: type=gha,scope=${{ inputs.distribution }}-${{ steps.platform.outputs.display_name }}
cache-to: type=gha,mode=max,scope=${{ inputs.distribution }}-${{ steps.platform.outputs.display_name }}

- name: Save image
shell: bash
run: |
docker save -o /tmp/image-${{ steps.platform.outputs.display_name }}.tar ${{ github.sha }}:${{ steps.platform.outputs.display_name }}

- name: Upload image
uses: actions/upload-artifact@v4
with:
Expand All @@ -115,7 +118,7 @@ runs:
if: ${{ contains(fromJSON('["amd64", "i386", "arm64"]'), steps.platform.outputs.display_name) }}
run: |
docker run -d --name sanity-test-${{ steps.platform.outputs.display_name }} ${{ github.sha }}:${{ steps.platform.outputs.display_name }}

- name: Container Logs
if: ${{ contains(fromJSON('["amd64", "i386", "arm64"]'), steps.platform.outputs.display_name) }}
shell: bash
Expand All @@ -128,7 +131,7 @@ runs:
run: |
docker exec sanity-test-${{ steps.platform.outputs.display_name }} redis-cli ping
docker exec sanity-test-${{ steps.platform.outputs.display_name }} redis-cli info server

- name: Verify installed modules
if: ${{ contains(fromJSON('["amd64", "arm64"]'), steps.platform.outputs.display_name) }}
shell: bash
Expand All @@ -148,7 +151,7 @@ runs:
echo "The following modules are missing: ${missing_modules[*]}"
exit 1
fi

- name: Test RedisBloom
if: ${{ contains(fromJSON('["amd64", "arm64"]'), steps.platform.outputs.display_name) }}
shell: bash
Expand All @@ -158,7 +161,7 @@ runs:
[ "$(docker exec sanity-test-${{ steps.platform.outputs.display_name }} redis-cli BF.EXISTS popular_keys "redis:hash")" = "1" ] || { echo "RedisBloom test failed: 'redis:hash' not found"; exit 1; }
[ "$(docker exec sanity-test-${{ steps.platform.outputs.display_name }} redis-cli BF.EXISTS popular_keys "redis:list")" = "0" ] || { echo "RedisBloom test failed: 'redis:list' found unexpectedly"; exit 1; }
echo "RedisBloom test passed successfully"

- name: Test RediSearch
if: ${{ contains(fromJSON('["amd64", "arm64"]'), steps.platform.outputs.display_name) }}
shell: bash
Expand Down Expand Up @@ -224,12 +227,44 @@ runs:
path: test/report-entrypoint.xml
reporter: java-junit

- name: Format registry tag
id: format-registry-tag
shell: bash
run: |
printf "tag=%s:%s%s-%s-%s" \
"${{ inputs.registry_repository }}" \
"${{ inputs.release_tag != '' && format('{0}-', inputs.release_tag || '') }}" \
"${{ github.sha }}" \
"${{ inputs.distribution }}" \
"${{ steps.platform.outputs.display_name }}" \
| tr '[:upper:]' '[:lower:]' >> "$GITHUB_OUTPUT"

- name: Push image
uses: docker/build-push-action@v6
if: ${{ inputs.publish_image == 'true' && contains(fromJSON('["amd64", "arm64"]'), steps.platform.outputs.display_name) }}
with:
context: ${{ inputs.distribution }}
push: true
tags: ${{ inputs.registry_repository }}:${{ github.sha }}-${{ inputs.distribution }}
tags: ${{ steps.format-registry-tag.outputs.tag }}
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Save image URL to artifact
shell: bash
run: |
if [[ "${{ inputs.publish_image }}" == "true" && "${{ contains(fromJSON('["amd64", "arm64"]'), steps.platform.outputs.display_name) }}" == "true" ]]; then
# Create a file with the image URL for this specific build
mkdir -p /tmp/image-urls
echo "${{ steps.format-registry-tag.outputs.tag }}" > "/tmp/image-urls/${{ inputs.distribution }}-${{ steps.platform.outputs.display_name }}.txt"
echo "Image URL saved: ${{ steps.format-registry-tag.outputs.tag }}"
else
echo "Image not published for this platform/distribution combination"
fi

- name: Upload image URL artifact
uses: actions/upload-artifact@v4
if: ${{ inputs.publish_image == 'true' && contains(fromJSON('["amd64", "arm64"]'), steps.platform.outputs.display_name) }}
with:
name: image-url-${{ inputs.distribution }}-${{ steps.platform.outputs.display_name }}
path: /tmp/image-urls/${{ inputs.distribution }}-${{ steps.platform.outputs.display_name }}.txt
retention-days: 1
Loading