Skip to content

Commit 50fb188

Browse files
Saurav AgarwalSaurav Agarwal
authored andcommitted
Add workflows
1 parent f865074 commit 50fb188

File tree

3 files changed

+126
-0
lines changed

3 files changed

+126
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: 'CI docker base'
2+
3+
inputs:
4+
base_tag:
5+
description: 'Base tag for docker'
6+
required: true
7+
dockerhub_username:
8+
required: true
9+
dockerhub_token:
10+
required: true
11+
github_token:
12+
required: true
13+
14+
runs:
15+
using: 'composite'
16+
steps:
17+
- name: downcase REPO
18+
run: |
19+
echo "REPO=${GITHUB_REPOSITORY@L}" >> ${GITHUB_ENV}
20+
echo "ACTOR=${GITHUB_ACTOR@L}" >> ${GITHUB_ENV}
21+
echo "REPO_NAME=${GITHUB_REPOSITORY#$GITHUB_REPOSITORY_OWNER/}" >> $GITHUB_ENV
22+
shell: bash
23+
- name: Login to Docker Hub
24+
uses: docker/login-action@v3
25+
with:
26+
username: ${{ inputs.dockerhub_username }}
27+
password: ${{ inputs.dockerhub_token }}
28+
- name: Login to GitHub Container Registry
29+
uses: docker/login-action@v3
30+
with:
31+
registry: ghcr.io
32+
username: ${{ github.actor }}
33+
password: ${{ inputs.github_token }}
34+
- name: Set up QEMU
35+
uses: docker/setup-qemu-action@v3
36+
- name: Set up Docker Buildx
37+
uses: docker/setup-buildx-action@v3
38+
- name: Docker meta
39+
id: meta
40+
uses: docker/metadata-action@v5
41+
with:
42+
images: |
43+
${{ inputs.dockerhub_username }}/${{ env.REPO_NAME }}
44+
ghcr.io/${{ github.repository }}
45+
tags: type=edge,pattern={{version}},suffix=-${{ inputs.base_tag }}
46+
- name: Build and push
47+
uses: docker/build-push-action@v5
48+
with:
49+
provenance: false
50+
platforms: linux/amd64
51+
file: setup_utils/docker/Dockerfile
52+
build-args: BASE_TAG=${{ inputs.base_tag }}
53+
push: true
54+
tags: ${{ steps.meta.outputs.tags }}
55+
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/ci_docker.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: ci
2+
on:
3+
release:
4+
types: [published]
5+
6+
jobs:
7+
docker-deploy:
8+
permissions: write-all
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
- name: Free Disk Space (Ubuntu)
14+
uses: jlumbroso/[email protected]
15+
- name: 'CI docker base'
16+
uses: ./.github/docker-base-action
17+
with:
18+
base_tag: pytorch2.2.1
19+
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
20+
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
21+
github_token: ${{ secrets.GITHUB_TOKEN }}
22+
- name: cleanup
23+
run: docker system prune -a -f
24+
- name: 'CI docker base'
25+
uses: ./.github/docker-base-action
26+
with:
27+
base_tag: pytorch2.2.1-cuda12.3.1
28+
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
29+
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
30+
github_token: ${{ secrets.GITHUB_TOKEN }}
31+
- name: cleanup
32+
run: docker system prune -a -f
33+
- name: 'CI docker base'
34+
uses: ./.github/docker-base-action
35+
with:
36+
base_tag: pytorch2.2.1-cuda12.3.1-ros2humble
37+
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
38+
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
39+
github_token: ${{ secrets.GITHUB_TOKEN }}
40+
- name: cleanup
41+
run: docker system prune -a -f
42+
- name: 'CI docker base'
43+
uses: ./.github/docker-base-action
44+
with:
45+
base_tag: pytorch2.2.1-ros2humble
46+
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
47+
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
48+
github_token: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
on:
2+
# release:
3+
# types: [published]
4+
push:
5+
branches:
6+
- main
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
deploy:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
- name: Action Doxygen and GitHub Pages
17+
id: ghaction
18+
uses: AgarwalSaurav/[email protected]
19+
with:
20+
github_token: ${{ secrets.GITHUB_TOKEN }}
21+
doxyfile-path: doc/Doxyfile
22+
html-output-folder: doc/html
23+
branch: gh-pages

0 commit comments

Comments
 (0)