Skip to content

Make the directory first #101

Make the directory first

Make the directory first #101

name: build-push-containers
on:
release:
types: [published]
push:
branches:
- 'main'
- 'og-develop'
jobs:
docker:
runs-on: [self-hosted, linux]
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Remove docker configs
run: |
mkdir /root/.docker && echo '{"auths": {}}' > /root/.docker/config.json
-
name: Login to NVCR
uses: redhat-actions/podman-login@v1
with:
auth_file_path: /run/containers/0/auth.json
registry: nvcr.io
username: ${{ secrets.NVCR_USERNAME }}
password: ${{ secrets.NVCR_PASSWORD }}
-
name: Login to Docker Hub
uses: redhat-actions/podman-login@v1
with:
auth_file_path: /run/containers/0/auth.json
registry: docker.io
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
-
name: Metadata for dev Image
id: meta-dev
uses: docker/metadata-action@v5
with:
images: |
stanfordvl/omnigibson-dev
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
-
name: Metadata for prod Image
id: meta-prod
uses: docker/metadata-action@v5
with:
images: |
stanfordvl/omnigibson
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
-
name: Build dev image
id: build-dev
uses: redhat-actions/buildah-build@v2
with:
image: stanfordvl/omnigibson-dev
tags: ${{ steps.meta-dev.outputs.tags }}
labels: ${{ steps.meta-dev.outputs.labels }}
containerfiles: docker/dev.Dockerfile
-
name: Build prod image
id: build-prod
uses: docker/build-push-action@v5
with:
image: stanfordvl/omnigibson
tags: ${{ steps.meta-prod.outputs.tags }}
labels: ${{ steps.meta-prod.outputs.labels }}
containerfiles: docker/prod.Dockerfile
-
name: Push dev image
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-dev.outputs.image }}
tags: ${{ steps.build-dev.outputs.tags }}
registry: docker.io
-
name: Push prod image
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-prod.outputs.image }}
tags: ${{ steps.build-prod.outputs.tags }}
registry: docker.io