Skip to content

Commit

Permalink
ci: fix publish-dockerhub (DAEMONS)
Browse files Browse the repository at this point in the history
Commit 82b9ba1, part of pmacct#816, broke upload of all DAEMONS but
base. The reason why it wasn't detected is because composite action
leaves DAEMONS set, so step 3 passes and step 4 just uploads
the single daemon base.

Fix it by defining it globally, and add a check for the list of
DAEMONS as part of step2, so that this is not happening again.
  • Loading branch information
msune committed Oct 1, 2024
1 parent 90e2353 commit d1c9424
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
1 change: 0 additions & 1 deletion .github/actions/build_containers/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ inputs:
daemons:
required: true
type: string
default: "pmacctd nfacctd sfacctd uacctd pmbgpd pmbmpd pmtelemetryd"
ci_num_workers:
required: false
type: string
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
- cron: '0 0 * * *' # every day at midnight

#Global vars
env:
DAEMONS: "pmacctd nfacctd sfacctd uacctd pmbgpd pmbmpd pmtelemetryd"

jobs:
### Step 1: build container images
builder-docker:
Expand Down Expand Up @@ -114,8 +117,19 @@ jobs:
fetch-depth: 0
fetch-tags: 1

- name: Check DAEMONS env. variable...
run: |
#Sanity, avoid regression #817
N_DAEMONS="$(echo $DAEMONS | wc --words)"
if [[ "${N_DAEMONS}" != "7" ]]; then
echo "ERROR: invalid number of DAEMONS: ${N_DAEMONS}"
exit 1
fi
- name: Build containers
uses: ./pmacct/.github/actions/build_containers/
with:
daemons: ${{env.DAEMONS}}

- name: Docker save images
run: |
Expand Down

0 comments on commit d1c9424

Please sign in to comment.