Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make test release docker target the specific branch when the label is run manually #252

Merged
merged 5 commits into from
Apr 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/publisher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,11 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: true
- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v5.1
- name: Build Docker Image
run: docker build --tag opendr-toolkit:cpu_$OPENDR_VERSION --file Dockerfile .
run: docker build --tag opendr-toolkit:cpu_$OPENDR_VERSION --build-arg branch=${{ steps.branch-name.outputs.current_branch }} --file Dockerfile .
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
Expand All @@ -59,8 +62,11 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: true
- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v5.1
- name: Build Docker Image
run: docker build --tag opendr-toolkit:cuda_$OPENDR_VERSION --file Dockerfile-cuda .
run: docker build --tag opendr-toolkit:cuda_$OPENDR_VERSION --build-arg branch=${{ steps.branch-name.outputs.current_branch }} --file Dockerfile-cuda .
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/tests_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,12 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: true
- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v5.1
- name: Build image
run: |
docker build --tag opendr/opendr-toolkit:cpu_test --file Dockerfile .
docker build --tag opendr/opendr-toolkit:cpu_test --build-arg branch=${{ steps.branch-name.outputs.current_branch }} --file Dockerfile .
docker save opendr/opendr-toolkit:cpu_test > cpu_test.zip
- name: Upload image artifact
uses: actions/upload-artifact@v2
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/tests_suite_develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,12 @@ jobs:
with:
submodules: true
ref: develop
- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v5.1
- name: Build image
run: |
docker build --tag opendr/opendr-toolkit:cpu_test --file Dockerfile .
docker build --tag opendr/opendr-toolkit:cpu_test --build-arg branch=${{ steps.branch-name.outputs.current_branch }} --file Dockerfile .
docker save opendr/opendr-toolkit:cpu_test > cpu_test.zip
- name: Upload image artifact
uses: actions/upload-artifact@v2
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM ubuntu:20.04

ARG branch

# Install dependencies
RUN apt-get update && \
apt-get --yes install git sudo
Expand All @@ -12,7 +14,7 @@ RUN chmod +x /tini
ENTRYPOINT ["/tini", "--"]

# Clone the repo and install the toolkit
RUN git clone --depth 1 --recurse-submodules -j8 https://github.com/opendr-eu/opendr
RUN git clone --depth 1 --recurse-submodules -j8 https://github.com/opendr-eu/opendr -b $branch
WORKDIR "/opendr"
RUN ./bin/install.sh

Expand Down
4 changes: 3 additions & 1 deletion Dockerfile-cuda
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM nvidia/cuda:11.0-base

ARG branch

# Install dependencies
RUN apt-get update && \
apt-get --yes install git sudo apt-utils
Expand Down Expand Up @@ -43,7 +45,7 @@ RUN sudo apt-get --yes install build-essential && \

# Clone the repo and install the toolkit
ENV OPENDR_DEVICE gpu
RUN git clone --depth 1 --recurse-submodules -j8 https://github.com/opendr-eu/opendr
RUN git clone --depth 1 --recurse-submodules -j8 https://github.com/opendr-eu/opendr -b $branch
WORKDIR "/opendr"
RUN ./bin/install.sh

Expand Down