forked from red-hat-storage/ocs-client-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (36 loc) · 1.08 KB
/
docker-push.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: image-publisher
on:
workflow_dispatch:
inputs:
REGISTRY_NAMESPACE:
required: true
default: ocs-dev
IMAGE_TAG:
required: false
default: ""
jobs:
docker-push:
name: docker-push
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Login to Quay
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:
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 container-build container-push
make bundle-build bundle-push
make catalog-build catalog-push