Skip to content

Commit 8a22625

Browse files
authored
Change compose tests in github so they are executed with current branch (#274)
* Change compose tests in github so they are executed with current branch Signed-off-by: jparisu <javierparis@eprosima.com> * apply suggestions Signed-off-by: jparisu <javierparis@eprosima.com> * echo env vars in action Signed-off-by: jparisu <javierparis@eprosima.com> Signed-off-by: jparisu <javierparis@eprosima.com>
1 parent db7df3a commit 8a22625

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

.github/workflows/docker_test.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,20 @@ jobs:
3131
with:
3232
path: src/DDS-Router
3333

34+
- name: Echo env variables
35+
run: |
36+
echo "--- Input Variables ---"
37+
echo "github.event.inputs.fastdds_branch: ${{ github.event.inputs.fastdds_branch }}"
38+
echo "github.event.inputs.ddsrouter_branch: ${{ github.event.inputs.ddsrouter_branch }}"
39+
40+
echo "--- Github Environment Variables ---"
41+
echo "github.head_ref: ${{ github.head_ref }}"
42+
43+
echo "--- Environment Variables ---"
44+
echo "DEFAULT_FASTDDS_BRANCH: ${{ env.DEFAULT_FASTDDS_BRANCH }}"
45+
echo "DEFAULT_DDSROUTER_BRANCH: ${{ env.DEFAULT_DDSROUTER_BRANCH }}"
46+
echo "DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE: ${{ env.DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE }}"
47+
3448
# Install colcon and required packages
3549
- name: Install apt packages
3650
uses: ./src/DDS-Router/.github/actions/install-apt-packages
@@ -44,7 +58,7 @@ jobs:
4458
docker build \
4559
--no-cache \
4660
--build-arg fastdds_branch=${{ github.event.inputs.fastdds_branch || env.DEFAULT_FASTDDS_BRANCH }} \
47-
--build-arg ddsrouter_branch=${{ github.event.inputs.ddsrouter_branch || env.DEFAULT_DDSROUTER_BRANCH }} \
61+
--build-arg ddsrouter_branch=${{ github.event.inputs.ddsrouter_branch || github.head_ref || env.DEFAULT_DDSROUTER_BRANCH }} \
4862
-t ${{ env.DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE }} \
4963
-f Dockerfile .
5064

0 commit comments

Comments
 (0)