-
Notifications
You must be signed in to change notification settings - Fork 15
53 lines (45 loc) · 1.67 KB
/
redhat-csp-download.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
42
43
44
45
46
47
48
49
50
51
52
53
name: Test redhat-csp-download
on:
push:
paths:
- .github/workflows/redhat-csp-download.yaml
- redhat-csp-download/**
pull_request:
paths:
- .github/workflows/redhat-csp-download.yaml
- redhat-csp-download/**
# Declare default permissions as read only.
permissions: read-all
jobs:
redhat-csp-download:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
- uses: hadolint/hadolint-action@54c9adbab1582c2ef04b2016b760714a4bfde3cf # v3.1.0
with:
dockerfile: redhat-csp-download/Dockerfile_build
- name: Switch the action to use the Dockerfile_build
run: |
mv redhat-csp-download/Dockerfile redhat-csp-download/Dockerfile_runnable
mv redhat-csp-download/Dockerfile_build redhat-csp-download/Dockerfile
- name: redhat-csp-download
uses: ./redhat-csp-download
with:
rh_username: ${{ secrets.RH_USERNAME }}
rh_password: ${{ secrets.RH_PASSWORD }}
download: '[{"file":"/github/workspace/eap-connectors.zip","url":"https://access.redhat.com/jbossnetwork/restricted/softwareDownload.html?softwareId=37193"}]'
- name: Check downloaded file exists
run: |
if [ -z "${{ secrets.RH_USERNAME }}" ] || [ -z "${{ secrets.RH_PASSWORD }}" ]
then
echo "RH_USERNAME or RH_PASSWORD is empty. Skipping."
exit 0
fi
FILE="eap-connectors.zip"
if [ -f "$FILE" ]; then
echo "$FILE exists."
else
echo "$FILE does not exist."
exit 1
fi