Skip to content

Commit

Permalink
Merge pull request #1287 from ClusterLabs/update-cd-image-20231214
Browse files Browse the repository at this point in the history
[crmsh-4.6] Dev: github-actions: update container image used in CD
  • Loading branch information
liangxin1300 authored Dec 15, 2023
2 parents b2728f3 + 45d7543 commit 4b06740
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/crmsh-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ name: crmsh CD
on: push

env:
FOLDER: /package
PACKAGE_NAME: crmsh
CONTAINER_IMAGE: nyang23/obs-continuous-delivery:latest
OBS_USER: ${{ secrets.OBS_USER }}
OBS_PASS: ${{ secrets.OBS_PASS }}
OBS_PROJECT: ${{ secrets.OBS_PROJECT_CRMSH45 }}
Expand All @@ -28,15 +28,14 @@ jobs:
- uses: actions/checkout@v3
- name: delivery process
run: |
docker pull shap/continuous_deliver:latest
docker run -t -v "$(pwd):/package" \
docker pull "${CONTAINER_IMAGE}"
docker run -t -v "$(pwd)":/package:ro \
-e OBS_USER=$OBS_USER \
-e OBS_PASS=$OBS_PASS \
-e FOLDER=$FOLDER \
-e OBS_PROJECT=$OBS_PROJECT \
-e PACKAGE_NAME=$PACKAGE_NAME \
shap/continuous_deliver \
/bin/bash -c "cd /package;/scripts/upload.sh"
"${CONTAINER_IMAGE}" \
/bin/bash -c "cp -r /package ~/package && cd ~/package && /scripts/upload.sh"
submit:
if: github.repository == 'ClusterLabs/crmsh' && github.ref_name == 'crmsh-4.6'
Expand All @@ -47,12 +46,12 @@ jobs:
- uses: actions/checkout@v3
- name: submit process
run: |
docker pull shap/continuous_deliver:latest
docker run -t -v "$(pwd):/package" \
docker pull "${CONTAINER_IMAGE}"
docker run -t \
-e OBS_USER=$OBS_USER \
-e OBS_PASS=$OBS_PASS \
-e OBS_PROJECT=$OBS_PROJECT \
-e PACKAGE_NAME=$PACKAGE_NAME \
-e TARGET_PROJECT=$TARGET_PROJECT \
shap/continuous_deliver \
/bin/bash -c "cd /package;/scripts/submit.sh"
"${CONTAINER_IMAGE}" \
/bin/bash -c "cd ~ && /scripts/submit.sh"

0 comments on commit 4b06740

Please sign in to comment.