Adds back NVIDIA AI Workbench support #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Docker Image CI | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up variables | |
| id: vars | |
| run: | | |
| echo "timestamp=$(date +%s)" >> $GITHUB_OUTPUT | |
| echo "branch=$(echo ${GITHUB_REF##*/} | tr '/' '-')" >> $GITHUB_OUTPUT | |
| - name: Log in to GitHub Container Registry | |
| run: | | |
| echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
| - name: Build and tag the Docker image | |
| run: | | |
| IMAGE=ghcr.io/$(echo ${{ github.repository_owner }}/${{ github.event.repository.name }} | tr '[:upper:]' '[:lower:]')/devx | |
| docker build .project/cache --file .project/brev.Containerfile --tag $IMAGE:${{ steps.vars.outputs.timestamp }} | |
| docker tag $IMAGE:${{ steps.vars.outputs.timestamp }} $IMAGE:${{ steps.vars.outputs.branch }} | |
| - name: Push both tags to GHCR | |
| run: | | |
| IMAGE=ghcr.io/$(echo ${{ github.repository_owner }}/${{ github.event.repository.name }} | tr '[:upper:]' '[:lower:]')/devx | |
| docker push $IMAGE:${{ steps.vars.outputs.timestamp }} | |
| docker push $IMAGE:${{ steps.vars.outputs.branch }} | |