Skip to content

Commit

Permalink
Fix release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
JBWatenbergScality authored Sep 25, 2023
1 parent 01490d0 commit 7253975
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,27 @@ jobs:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.REGISTRY_LOGIN }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Install Oras
run: |
curl -LO https://github.com/oras-project/oras/releases/download/v${ORAS_VERSION}/oras_${ORAS_VERSION}_linux_amd64.tar.gz
mkdir -p oras-install/
sudo tar -zxf oras_${ORAS_VERSION}_*.tar.gz -C /usr/local/bin oras
rm -rf oras_${ORAS_VERSION}_*.tar.gz oras-install/
env:
ORAS_VERSION: '0.12.0'
- name: Oras login
run: oras login --username "${LOGIN}" --password "${PASSWORD}" ${REGISTRY}
env:
LOGIN: '${{ secrets.REGISTRY_LOGIN }}'
PASSWORD: '${{ secrets.REGISTRY_PASSWORD }}'

- name: push nginx and runtime-app-configuration
run: |
oras push ${REGISTRY}/${PROD_NAMESPACE}/${CONFIG_IMAGE}:$GITHUB_REF_NAME \
runtime-app-configuration.gotempl:application/zenko-ui-runtime-config-template+json \
nginx.conf.gotempl:text/nginx-conf-template
- name: Retag the docker image
run: |
docker pull ${REGISTRY}/${DEV_NAMESPACE}/${UI_IMAGE}:$GITHUB_SHA
docker pull ${REGISTRY}/${DEV_NAMESPACE}/${CONFIG_IMAGE}:$GITHUB_SHA
docker tag ${REGISTRY}/${DEV_NAMESPACE}/${UI_IMAGE}:$GITHUB_SHA ${REGISTRY}/${PROD_NAMESPACE}/${UI_IMAGE}:$GITHUB_REF_NAME
docker tag ${REGISTRY}/${DEV_NAMESPACE}/${CONFIG_IMAGE}:$GITHUB_SHA ${REGISTRY}/${PROD_NAMESPACE}/${CONFIG_IMAGE}:$GITHUB_REF_NAME
docker push ${REGISTRY}/${PROD_NAMESPACE}/${UI_IMAGE}:$GITHUB_REF_NAME
docker push ${REGISTRY}/${PROD_NAMESPACE}/${CONFIG_IMAGE}:$GITHUB_REF_NAME

0 comments on commit 7253975

Please sign in to comment.