ci: use master instead of main #1
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: BuildAndPushImageOnHarbor | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Add SHORT_SHA env property with commit short sha | |
| run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV | |
| - uses: docker/login-action@v1 | |
| with: | |
| registry: registry.rcp.epfl.ch | |
| username: ${{ secrets.HARBOR_USERNAME }} | |
| password: ${{ secrets.HARBOR_PASSWORD }} | |
| - uses: actions/checkout@v3 | |
| - name: BuildAndPushImageOnHarbor | |
| run: | | |
| docker build ./ -t registry.rcp.epfl.ch/swiss-ai-mmore/mmore:${SHORT_SHA} | |
| docker push registry.rcp.epfl.ch/swiss-ai-mmore/mmore:${SHORT_SHA} |