diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..45e1093 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,38 @@ +name: Manually Triggered Build and Push + +on: + workflow_dispatch: + inputs: + baseImage: + description: 'Base image (e.g., nvcr.io/nvidia/tritonserver)' + required: true + default: 'nvcr.io/nvidia/tritonserver' + baseTag: + description: 'Base image tag (e.g., 24.01-py3-igpu)' + required: true + default: '24.01-py3-igpu' + +jobs: + build-and-push: + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v2 + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push Docker image + uses: docker/build-push-action@v2 + with: + context: . + file: ./Dockerfile + push: true + tags: ghcr.io/${{ github.repository }}/tritonserver-custom:${{ github.event.inputs.baseTag }} + build-args: | + BASE_IMAGE=${{ github.event.inputs.baseImage }} + BASE_TAG=${{ github.event.inputs.baseTag }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 45e1093..d2d7e1e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,38 +1,19 @@ -name: Manually Triggered Build and Push +# .github/workflows/release.yml +name: Release Workflow on: - workflow_dispatch: - inputs: - baseImage: - description: 'Base image (e.g., nvcr.io/nvidia/tritonserver)' - required: true - default: 'nvcr.io/nvidia/tritonserver' - baseTag: - description: 'Base image tag (e.g., 24.01-py3-igpu)' - required: true - default: '24.01-py3-igpu' + push: + branches: + - main # Adjust this to match your release branch or triggering condition jobs: - build-and-push: + trigger-builds: runs-on: ubuntu-latest - steps: - - name: Check out the repo - uses: actions/checkout@v2 - - - name: Log in to GitHub Container Registry - uses: docker/login-action@v1 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push Docker image - uses: docker/build-push-action@v2 - with: - context: . - file: ./Dockerfile - push: true - tags: ghcr.io/${{ github.repository }}/tritonserver-custom:${{ github.event.inputs.baseTag }} - build-args: | - BASE_IMAGE=${{ github.event.inputs.baseImage }} - BASE_TAG=${{ github.event.inputs.baseTag }} + strategy: + matrix: + baseImage: ['nvcr.io/nvidia/tritonserver'] + baseTag: ['23.08'] + uses: ./.github/workflows/build.yml + with: + baseImage: ${{ matrix.baseImage }} + baseTag: ${{ matrix.Tag}}