Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
189 commits
Select commit Hold shift + click to select a range
747f258
First branch manipulation implementation
Peter-Sh Jul 31, 2025
30a56c3
Fix workflow
Peter-Sh Jul 31, 2025
032055a
Fix yaml
Peter-Sh Jul 31, 2025
3382664
Fix path to actions
Peter-Sh Jul 31, 2025
577bacc
Fix push empty branches
Peter-Sh Jul 31, 2025
e66efcb
Use different runner
Peter-Sh Jul 31, 2025
115f871
Pretty output
Peter-Sh Jul 31, 2025
1004d4b
Fix execut command
Peter-Sh Jul 31, 2025
f3ce66f
Use common base
Peter-Sh Aug 1, 2025
fc14bd0
Add validate archive action
Peter-Sh Aug 1, 2025
028a046
Make executable
Peter-Sh Aug 1, 2025
40f026f
Make curl return error
Peter-Sh Aug 1, 2025
39e76d7
Make curl silent
Peter-Sh Aug 1, 2025
9409926
Try to use pre-merge.yml
Peter-Sh Aug 1, 2025
ce929b9
allow-modify flag
Peter-Sh Aug 1, 2025
1902a92
Fix workflow
Peter-Sh Aug 1, 2025
c463eab
Fix worflow reuse
Peter-Sh Aug 1, 2025
83f6320
Fixed required property type
Peter-Sh Aug 1, 2025
05f466f
Remove runs-on
Peter-Sh Aug 1, 2025
90e281a
Add apply-docker-version
Peter-Sh Aug 1, 2025
70016d4
Use explicit branch name
Peter-Sh Aug 1, 2025
842a702
Branches doesn't work with local versions
Peter-Sh Aug 1, 2025
982c44f
Add bot name
Peter-Sh Aug 1, 2025
f15bd2f
Try locl config
Peter-Sh Aug 1, 2025
24c5fd9
Use --author
Peter-Sh Aug 1, 2025
41b65ef
debug output
Peter-Sh Aug 1, 2025
ce9cb02
Auto merge from release branch
Peter-Sh Aug 1, 2025
2496157
Push after merge, use helpers
Peter-Sh Aug 1, 2025
0b0247b
debug output
Peter-Sh Aug 1, 2025
f5da99a
Try to use --unshallow
Peter-Sh Aug 1, 2025
fba39d1
Try to combine unshallow and not unshallow
Peter-Sh Aug 1, 2025
fdc0e41
Use function to fetch unshallow
Peter-Sh Aug 1, 2025
6639783
Set author for merge
Peter-Sh Aug 1, 2025
58abbd0
Fix sha calculation
Peter-Sh Aug 1, 2025
68199b3
Fix ensure branch call when building
Peter-Sh Aug 1, 2025
4bf54ba
Fix ensure branch call when building
Peter-Sh Aug 1, 2025
2e3988d
Try to create verified commit
Peter-Sh Aug 2, 2025
aa887be
Push to release_version_branch instead of release_branch
Peter-Sh Aug 2, 2025
8d4bb22
Optional workflow_uuid
Peter-Sh Aug 28, 2025
dae088c
Use run-name
Peter-Sh Aug 28, 2025
c5a6e4f
Fix double space
Peter-Sh Aug 28, 2025
a7df6e2
Use ghcr.io to push images
Peter-Sh Aug 28, 2025
d075925
Enable build again for testing
Peter-Sh Aug 28, 2025
05c91f9
Redis 8.2 m01 (#462)
adamiBs Jun 19, 2025
dacd3a8
Add push trigger for release/8.2 and update Redis version to 8.2-rc1-int
adamiBs Jul 3, 2025
5f13ecc
Try to fix ghcr.io tag
Peter-Sh Aug 28, 2025
5f2f9b2
Fix release_tag propagation
Peter-Sh Aug 28, 2025
fe95910
Fix unexpected end of expression
Peter-Sh Aug 28, 2025
97235d8
registry tags must be lowercase
Peter-Sh Aug 28, 2025
a554fb4
Step to correctly format registry tag
Peter-Sh Aug 28, 2025
07540db
Remove unsupported toLower()
Peter-Sh Aug 28, 2025
5c7140b
Fix step shell
Peter-Sh Aug 28, 2025
751740f
Try verified merge
Peter-Sh Aug 28, 2025
9c7724b
Fix heredoc
Peter-Sh Aug 28, 2025
06c1503
Show commits
Peter-Sh Aug 28, 2025
07f0491
Debug
Peter-Sh Aug 28, 2025
af947c9
debg
Peter-Sh Aug 28, 2025
da75329
Format oneline
Peter-Sh Aug 28, 2025
ec87b9e
Remove heredoc
Peter-Sh Aug 28, 2025
13857b9
debug3
Peter-Sh Aug 28, 2025
3ea29ee
debug 4
Peter-Sh Aug 28, 2025
2a28b85
debyg 5
Peter-Sh Aug 28, 2025
875cc1f
Add GITHUB_TOKEN
Peter-Sh Aug 28, 2025
a29cb4b
Pass gh_token
Peter-Sh Aug 28, 2025
4cd3d10
debug 6
Peter-Sh Aug 28, 2025
2437a54
fix tkn
Peter-Sh Aug 28, 2025
7ee49b7
debug 7
Peter-Sh Aug 28, 2025
c906b7a
remove set -x
Peter-Sh Aug 28, 2025
17fb1f2
Moved verfied merge into function
Peter-Sh Aug 29, 2025
399ed23
Just a change
Peter-Sh Aug 29, 2025
166cf8d
Fix arguments parsing
Peter-Sh Aug 29, 2025
d29dd9c
Add second shift
Peter-Sh Aug 29, 2025
78149e1
Fix docker files updating
Peter-Sh Aug 29, 2025
4ef4bbc
Merge back
Peter-Sh Aug 29, 2025
ec5edfd
Enable build
Peter-Sh Aug 29, 2025
3ab6e57
Set execute bit
Peter-Sh Aug 29, 2025
966cf3c
Add debug
Peter-Sh Aug 29, 2025
885e10e
Skip build for debug
Peter-Sh Aug 29, 2025
84144b8
Disable fail on error
Peter-Sh Aug 29, 2025
9710f2b
Further debug
Peter-Sh Aug 29, 2025
d1b9226
Fix merge function and add gh token
Peter-Sh Aug 29, 2025
cc31fac
Fix env
Peter-Sh Aug 29, 2025
6b62bed
Move reusable actions to redis-oss-release-automation
Peter-Sh Aug 29, 2025
4115958
Fix actions refs
Peter-Sh Aug 29, 2025
04876b8
Remove actions that were transerred to release automation
Peter-Sh Aug 29, 2025
05587c6
Return commented out actions
Peter-Sh Aug 29, 2025
f7728f1
Use common from another repo
Peter-Sh Aug 29, 2025
9f342e5
Fix remote action usage instead of local
Peter-Sh Aug 29, 2025
92cba3a
Test merge back without changed files
Peter-Sh Aug 29, 2025
50f2f41
Return full build
Peter-Sh Aug 29, 2025
3cad7ce
Prepare stackbrew librirary intermediate commit
Peter-Sh Sep 9, 2025
bd32271
Support for EOLing versions, fixes and update tests
Peter-Sh Sep 10, 2025
10da9ca
Comments and fixes to the shell version
Peter-Sh Sep 11, 2025
3701edd
Python release-automation implementation
Peter-Sh Sep 11, 2025
5e3df22
Triggering workflow
Peter-Sh Sep 11, 2025
5d5c8c1
Fix trigger
Peter-Sh Sep 11, 2025
51176ea
Docker for releasr-automation
Peter-Sh Sep 11, 2025
5572ad2
Test release-automation docker
Peter-Sh Sep 11, 2025
ec92bf9
Fix image url
Peter-Sh Sep 11, 2025
9590f99
Test remote names
Peter-Sh Sep 11, 2025
d9018e8
fix
Peter-Sh Sep 11, 2025
04b3c2e
fix add to safe directory
Peter-Sh Sep 11, 2025
05c06fe
Debug output
Peter-Sh Sep 11, 2025
56227bc
Continue debugging
Peter-Sh Sep 11, 2025
85654ad
Remove env to test
Peter-Sh Sep 11, 2025
f9ba062
Removed safe dir
Peter-Sh Sep 11, 2025
3b13175
debug outpu
Peter-Sh Sep 11, 2025
e6a1a34
Debug output
Peter-Sh Sep 11, 2025
43b7e03
Add global safe dir and run tests
Peter-Sh Sep 11, 2025
4810102
Fix docker image
Peter-Sh Sep 11, 2025
1548903
Try to fix workspace
Peter-Sh Sep 11, 2025
5948ac5
cd to release-automation for testing
Peter-Sh Sep 11, 2025
2193d46
Comment
Peter-Sh Sep 11, 2025
4e066c0
Full stackbrew format support
Peter-Sh Sep 11, 2025
deda3ca
Try interactive mode
Peter-Sh Sep 12, 2025
6a1a40a
Use only -i
Peter-Sh Sep 12, 2025
6c1ca04
Try force color
Peter-Sh Sep 12, 2025
e62b9df
Readme
Peter-Sh Sep 12, 2025
8354968
Refactoring the code
Peter-Sh Sep 12, 2025
2f4f938
Temporary disable the build, test tag creation
Peter-Sh Sep 12, 2025
6ccc3e4
Create tag only if merge was done
Peter-Sh Sep 12, 2025
79b78b7
Debug output
Peter-Sh Sep 12, 2025
69ade3a
lilbit dbg
Peter-Sh Sep 12, 2025
108178c
fix dblquoute
Peter-Sh Sep 12, 2025
1bad919
Remove debug
Peter-Sh Sep 12, 2025
a305b0a
Release handle
Peter-Sh Sep 13, 2025
8019d5a
Rename release_handle
Peter-Sh Sep 13, 2025
4ce4840
Release publish first run
Peter-Sh Sep 13, 2025
fa21c17
Fix push condition
Peter-Sh Sep 13, 2025
14619d2
Fix yaml for release_publish workflow
Peter-Sh Sep 13, 2025
b6847af
Remove push run
Peter-Sh Sep 13, 2025
ee47215
Creating a PR: first attempt
Peter-Sh Sep 13, 2025
1008b6b
Fix official images url
Peter-Sh Sep 13, 2025
9231cc7
Fix update-stackbrew-file args
Peter-Sh Sep 13, 2025
6a53f13
Swap remotes
Peter-Sh Sep 13, 2025
d1282db
Use token for fork
Peter-Sh Sep 13, 2025
f5735b4
Show color diff
Peter-Sh Sep 13, 2025
ae11a6a
Add generated output entries
Peter-Sh Sep 13, 2025
e686b4f
Upload release_info
Peter-Sh Sep 13, 2025
ffa5085
Increase artifact lifetime, remove unused yaml
Peter-Sh Sep 17, 2025
0943598
Use redis-developer fork, but target personal repo for testing
Peter-Sh Sep 17, 2025
63b72d6
Use personal token for PR
Peter-Sh Sep 17, 2025
0553b7e
Fix fork url
Peter-Sh Sep 17, 2025
93ff89d
Add a DRAFT note
Peter-Sh Sep 17, 2025
e79521b
Try syncing fork and pushing to master
Peter-Sh Sep 17, 2025
7b43072
Revert "Try syncing fork and pushing to master"
Peter-Sh Sep 17, 2025
26d4bb2
Use official docker for testing
Peter-Sh Sep 17, 2025
ebb9af7
Collect image urls to release handle
Peter-Sh Sep 17, 2025
85098f0
Return to personal repo for testing
Peter-Sh Sep 17, 2025
b97b3a3
Temporary disable some of the architectures
Peter-Sh Sep 17, 2025
d0af661
Leave only 2 images
Peter-Sh Sep 17, 2025
05f24cc
Try self-hosted runners
Peter-Sh Sep 17, 2025
f3b3c3f
Fix image urls
Peter-Sh Sep 17, 2025
3b2d351
Used scoped layer cache
Peter-Sh Sep 17, 2025
e17b040
Introduce wait for redis instead of always sleep
Peter-Sh Sep 17, 2025
a896c7e
Increase timeout
Peter-Sh Sep 17, 2025
2c94090
Really increase timeout
Peter-Sh Sep 17, 2025
f5608e1
Fix wait for redis: use correct container id
Peter-Sh Sep 17, 2025
2b75250
Return official images for demo
Peter-Sh Sep 17, 2025
0a51665
Add slack notification about image urls
Peter-Sh Sep 18, 2025
eeb43aa
Revert "Return official images for demo"
Peter-Sh Sep 18, 2025
beba4ca
Reformat slack message
Peter-Sh Sep 18, 2025
d881188
Slack msg for PR creation
Peter-Sh Sep 18, 2025
decab33
Debug output
Peter-Sh Sep 18, 2025
bf3fe9c
Further debug
Peter-Sh Sep 18, 2025
b476c36
Try using GITHUB_WORKSPACE env
Peter-Sh Sep 18, 2025
355f175
Use checkout action
Peter-Sh Sep 18, 2025
d7d02ec
Fix curl execution for slack
Peter-Sh Sep 18, 2025
15b72a7
Use official repo
Peter-Sh Sep 18, 2025
86b7b5b
Proper milestone filtering and tests
Peter-Sh Sep 18, 2025
c5f21c6
Fix slack footer, return personal target
Peter-Sh Sep 18, 2025
c200912
Fix sort in eol filter, update tests
Peter-Sh Sep 19, 2025
da0590c
Change slack msg format for images list
Peter-Sh Sep 19, 2025
9a93e72
Add mentions and link to changes
Peter-Sh Sep 19, 2025
b94ec55
New icon, move user mentions to env
Peter-Sh Sep 19, 2025
949eb10
Fix icon and url
Peter-Sh Sep 19, 2025
d45b95c
Test failure
Peter-Sh Sep 19, 2025
46d1ceb
Fix failure message failure
Peter-Sh Sep 19, 2025
19091d8
Remove bash stackbrew implementation
Peter-Sh Sep 19, 2025
9df75ac
Test build failure notification
Peter-Sh Sep 19, 2025
b097d3f
Checkout code for failure notification
Peter-Sh Sep 19, 2025
0b5377b
Fix tag in build failure message
Peter-Sh Sep 19, 2025
2a4a6ca
Removed failure test
Peter-Sh Sep 19, 2025
e105aad
Align with redis/docker-library-redis
Peter-Sh Sep 19, 2025
21c8929
Gitignore for release-automation
Peter-Sh Sep 19, 2025
4bb53c1
Removed draft warning and returned official target and user mentions
Peter-Sh Sep 19, 2025
497dd98
Comment out duplicate variables
Peter-Sh Sep 19, 2025
bbb4405
Merge release-automation
Peter-Sh Sep 19, 2025
eeaacb3
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"]'), 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"]'), 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"]'), 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"]'), 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"]'), 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"]'), 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"]'), 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"]'), 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