Skip to content

ci: use master instead of main #1

ci: use master instead of main

ci: use master instead of main #1

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}