Skip to content

Conversation

@Rakshith-R
Copy link
Collaborator

@Rakshith-R Rakshith-R commented Nov 12, 2025

  • add workflow to
    • test building images on each pr
    • build and push images on each pr merge

@Rakshith-R
Copy link
Collaborator Author

/cc @Madhu-1

/hold

We need quay credentials set in github workflow secrets before merging this pr :)

      - name: Login to quay.io
        uses: docker/login-action@v3
        with:
          registry: quay.io
          username: ${{ secrets.QUAY_USERNAME }}
          password: ${{ secrets.QUAY_PASSWORD }}

@Madhu-1
Copy link
Member

Madhu-1 commented Nov 12, 2025

/cc @Madhu-1

/hold

We need quay credentials set in github workflow secrets before merging this pr :)

      - name: Login to quay.io
        uses: docker/login-action@v3
        with:
          registry: quay.io
          username: ${{ secrets.QUAY_USERNAME }}
          password: ${{ secrets.QUAY_PASSWORD }}

will figure this out and add it to github later will merge this one.

Copy link
Member

@Madhu-1 Madhu-1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added a generic comment with tag and branch name

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and push sidecar container image
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build and push the mover container image

push: false
tags: quay.io/ramendr/ceph-volsync-plugin-operator:latest

build_operator:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

build_mover

@Rakshith-R Rakshith-R force-pushed the build-push-images branch 2 times, most recently from 68fc1af to e49438c Compare November 13, 2025 09:31
@Rakshith-R Rakshith-R requested a review from Madhu-1 November 13, 2025 09:38
@Rakshith-R
Copy link
Collaborator Author

Modified it to a single workflow file that

  • tests buids on each pr
  • builds and pushes image when pr merges to main or release-* branches
    (refer here for release-* branch testing details)

I'll add workflow to build and push tagged images with artifacts similar to https://github.com/csi-addons/kubernetes-csi-addons/blob/main/.github/workflows/tag-release.yaml in a follow-up pr

please take a look

Comment on lines 40 to 43
else
tag="latest"
echo "Generated tag: $tag"
echo "tag=$tag" >> $GITHUB_OUTPUT
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks extra we already have latest in if case

Comment on lines 119 to 152
- name: Check out the repo
uses: actions/checkout@v5

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Generate image tag
id: tag
run: |
if [[ "${{ github.ref_name }}" == "main" ]]; then
tag="latest"
echo "Generated tag: $tag"
echo "tag=$tag" >> $GITHUB_OUTPUT
elif [[ "${{ github.ref_name }}" == release-* ]]; then
version=$(echo "${{ github.ref_name }}" | sed 's/release-//')
tag="v${version}-latest"
echo "Generated tag: $tag"
echo "tag=$tag" >> $GITHUB_OUTPUT
else
tag="latest"
echo "Generated tag: $tag"
echo "tag=$tag" >> $GITHUB_OUTPUT
fi

- name: Login to quay.io
if: github.event_name == 'push'
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use composite action to avoid this duplication in all 3 jobs

@Rakshith-R
Copy link
Collaborator Author

you can use composite action to avoid this duplication in all 3 jobs

Used matrix strategy instead to simplify.
Please take a look.

This commit adds workflow to build images
to test on pull requests and to build & push
images after each pr merge.

Signed-off-by: Rakshith R <rar@redhat.com>
@Madhu-1 Madhu-1 merged commit a8271a7 into RamenDR:main Nov 13, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants