chore: fix image build and push actions to automate image build process. #2670
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: Image | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: "Free up disk space" | |
| uses: ./.github/actions/free-up-disk-space | |
| - name: Build NVCR dev Image | |
| run: | | |
| docker build -t fms-hf-tuning-dev:latest . -f build/nvcr.Dockerfile | |
| - name: Login to Quay.io | |
| if: github.event_name == 'push' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: quay.io | |
| username: ${{ secrets.QUAY_USERNAME }} | |
| password: ${{ secrets.QUAY_ROBOT_TOKEN }} | |
| - name: Push docker image for every commit to Quay.io as dev images | |
| if: github.event_name == 'push' | |
| run: | | |
| docker push ${{ env.QUAY_REPOSITORY }}/fms-hf-tuning-dev:latest |