Skip to content

Commit eb4b929

Browse files
authored
Release workflow: fixed version from published release. (#32)
Also moved some steps to different places.
1 parent 614d43a commit eb4b929

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

.github/workflows/release.yaml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,18 @@ jobs:
2929

3030
steps:
3131
- name: Set release version output var depending on the trigger type.
32-
id: set_release
3332
run: |
3433
if [ ${GITHUB_EVENT_NAME} == "workflow_dispatch" ]; then
35-
echo "Manually triggered workflow to make release ${{ inputs.version }}"
3634
VERSION=${{ inputs.version }}
37-
echo "VERSION=${VERSION}" >> ${GITHUB_ENV}
35+
echo "Manually triggered workflow to make release ${VERSION}"
3836
else
39-
echo "New release published: ${{ github.ref_name }}"
40-
echo "VERSION=${{ github.ref_name }}" >> ${GITHUB_ENV}
37+
VERSION=${{ github.ref_name }}
38+
echo "New release published: ${VERSION}"
4139
fi
4240
4341
REPO=${REGISTRY}/${REGISTRY_USER}/${REPO_BASE_NAME}
4442
43+
echo "VERSION=${VERSION}" >> ${GITHUB_ENV}
4544
echo "IMG=${REPO}:v${VERSION}" >> ${GITHUB_ENV}
4645
echo "SIDECAR_IMG=${REPO}-sidecar:v${VERSION}" >> ${GITHUB_ENV}
4746
echo "BUNDLE_IMG=${REPO}-bundle:v${VERSION}" >> ${GITHUB_ENV}
@@ -55,11 +54,21 @@ jobs:
5554
echo " - Bundle : ${BUNDLE_IMG}"
5655
echo " - Catalog : ${CATALOG_IMG}"
5756
57+
- name: Authenticate against Quay.io
58+
uses: docker/login-action@v2
59+
with:
60+
registry: ${{ env.REGISTRY }}
61+
username: ${{ secrets.QUAY_ROBOT_USERNAME }}
62+
password: ${{ secrets.QUAY_ROBOT_TOKEN }}
63+
5864
- name: Set up Go 1.21
5965
uses: actions/setup-go@v4
6066
with:
6167
go-version: 1.21.7
6268

69+
- name: Disable default go problem matcher
70+
run: echo "::remove-matcher owner=go::"
71+
6372
- name: Download operator-sdk
6473
env:
6574
OPERATOR_SDK_BIN: operator-sdk_linux_amd64
@@ -71,21 +80,11 @@ jobs:
7180
sudo mv ${OPERATOR_SDK_BIN} ${OPERATOR_SDK_DEST_FOLDER}/operator-sdk
7281
operator-sdk version
7382
74-
- name: Disable default go problem matcher
75-
run: echo "::remove-matcher owner=go::"
76-
7783
- name: Check out the repo.
7884
uses: actions/checkout@v3
7985
with:
8086
ref: ${{ github.ref_name }}
8187

82-
- name: Authenticate against Quay.io
83-
uses: docker/login-action@v2
84-
with:
85-
registry: ${{ env.REGISTRY }}
86-
username: ${{ secrets.QUAY_ROBOT_USERNAME }}
87-
password: ${{ secrets.QUAY_ROBOT_TOKEN }}
88-
8988
- name: Build and push sidecar app image
9089
run: docker build --no-cache -t "${SIDECAR_IMG}" -f cnf-cert-sidecar/Dockerfile . && docker push ${SIDECAR_IMG}
9190

0 commit comments

Comments
 (0)