image-publisher #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: image-publisher | |
on: | |
workflow_dispatch: | |
inputs: | |
REGISTRY_NAMESPACE: | |
required: true | |
default: ocs-dev | |
IMAGE_TAG: | |
required: false | |
default: "" | |
jobs: | |
docker-push: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- uses: docker/login-action@v3 | |
with: | |
registry: quay.io | |
username: ${{ secrets.QUAY_USERNAME }} | |
password: ${{ secrets.QUAY_ROBOT_TOKEN }} | |
- name: Build and push docker images | |
env: | |
IMAGE_NAME: cephcsi-operator | |
REGISTRY_NAMESPACE: ${{ github.event.inputs.REGISTRY_NAMESPACE }} | |
IMAGE_TAG: ${{ github.event.inputs.IMAGE_TAG }} | |
IMAGE_TAG_SHA: ${{ github.ref_name }}-${{ github.sha }} | |
run: | | |
# Set IMAGE_TAG to a calculated <branch>-<sha> if not specified | |
export IMAGE_TAG=${IMAGE_TAG:-${IMAGE_TAG_SHA:0:-33}} | |
make -f Makefile.Downstream.mk docker-build docker-push | |
make -f Makefile.Downstream.mk bundle-build bundle-push |