Skip to content

Commit 229c8c7

Browse files
committed
Make different versions with action vars
1 parent 2b78721 commit 229c8c7

File tree

3 files changed

+34
-13
lines changed

3 files changed

+34
-13
lines changed

.github/workflows/build_installation_package.yaml

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,49 @@ jobs:
1111
- name: Checkout repository
1212
uses: actions/checkout@v4
1313
- name: Download and compress dependencies
14+
env:
15+
DMWM_GIT_URL: ${{ vars.DMWM_GIT_URL }}
16+
DMWM_GIT_TAG: ${{ vars.DMWM_GIT_TAG }}
17+
DQMGUI_GIT_URL: ${{ vars.DQMGUI_GIT_URL }}
18+
DQMGUI_GIT_TAG: ${{ vars.DQMGUI_GIT_TAG }}
19+
ROOT_GIT_URL: ${{ vars.ROOT_GIT_URL }}
20+
ROOT_GIT_TAG: ${{ vars.ROOT_GIT_TAG }}
1421
run: |
1522
sudo apt update && sudo apt install -y libcurl4-gnutls-dev
1623
$(which python3) --version
17-
bash download_dependencies.sh
24+
bash download_dependencies.sh DMWM_GIT_TAG=$DMWM_GIT_TAG DMWM_GIT_URL=$DMWM_GIT_URL DQMGUI_GIT_TAG=$DQMGUI_GIT_TAG ROOT_GIT_URL=$ROOT_GIT_URL ROOT_GIT_TAG=$ROOT_GIT_TAG
1825
bash build_installation_package.sh
26+
echo "Automatically generated release for making the installation
27+
package publicly available.
28+
29+
Used:
30+
31+
* DMWM_GIT_URL=${DMWM_GIT_URL}
32+
33+
* DMWM_GIT_TAG=${DMWM_GIT_TAG}
34+
35+
* DQMGUI_GIT_URL=${DQMGUI_GIT_URL}
36+
37+
* DQMGUI_GIT_TAG=${DQMGUI_GIT_TAG}
38+
39+
* ROOT_GIT_URL=${ROOT_GIT_URL}
40+
41+
* ROOT_GIT_TAG=${ROOT_GIT_TAG}
42+
43+
" >> /tmp/release_body.md
44+
echo "RELEASE_TAG=deployment_${DMWM_GIT_TAG}_dqmgui_${DQMGUI_GIT_TAG}_root_${ROOT_GIT_TAG}" >> $GITHUB_ENV
1945
- name: Archive package artifact
2046
uses: actions/upload-artifact@v3
2147
with:
2248
name: dqmgui-installation-package
2349
path: |
2450
/tmp/dqmgui/dqmgui_installation_package.tar.gz
25-
# Create a dummy release, so that the artifact is downloadable
26-
# without a GitHub account
27-
# This will automatically update the artifacts of the "latest" release,
28-
# even though the "latest" tag does match with the actually latest commit.
51+
# Create a release based on the tags used, so that the artifact is downloadable
52+
# without a GitHub account.
2953
- name: Release
3054
uses: ncipollo/release-action@v1
3155
with:
3256
artifacts: "/tmp/dqmgui/dqmgui_installation_package.tar.gz"
33-
body:
34-
"Automatically generated dummy release for making the installation
35-
package publicly available. The `latest` tag is
36-
put on a random commit, and does not reflect the current state of the release,
37-
while the artifact of this release is updated with the actually latest files,
38-
on each push."
39-
tag: "latest"
57+
bodyFile: "/tmp/release_body.md"
58+
tag: ${{ env.RELEASE_TAG }}
4059
allowUpdates: "true"

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ This procedure has been tested on a RHEL8 Openstack VM. Instructions below are p
9595
```
9696
OR
9797
* Download all the required files yourself (this is useful if you need specific versions of DMQM/deployment or DQMGUI, change them in `config.sh`):
98+
> **Warning**
99+
> You will need to have the same python version with the machine you rill be installing to! Configure that in `config.sh`, with the `PYTHON_VERSION` variable.
98100
```bash
99101
git clone --depth 1 https://github.com/cms-DQM/dqmgui_prod_deployment && cd dqmgui_prod_deployment
100102
# Now change config.sh as needed.

config.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# Target python version. This is important for downloading
88
# compatible packages for PyPI. Make sure it's the same
99
# with the python version that is running on the target machine.
10-
PYTHON_VERSION=3.11
10+
PYTHON_VERSION=3.8
1111

1212
# Tag to use for getting the layouts and manage/deploy scripts
1313
# See: https://github.com/dmwm/deployment/tags

0 commit comments

Comments
 (0)