We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ed045a7 commit 4840cc8Copy full SHA for 4840cc8
1 file changed
.github/workflows/push-to-registry.yml
@@ -0,0 +1,26 @@
1
+name: BuildAndPushImageOnHarbor
2
+
3
+on:
4
+ push:
5
+ branches: [ "main" ]
6
+ workflow_dispatch:
7
8
+jobs:
9
+ build:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
13
+ - name: Add SHORT_SHA env property with commit short sha
14
+ run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
15
16
+ - uses: docker/login-action@v1
17
+ with:
18
+ registry: registry.rcp.epfl.ch
19
+ username: ${{ secrets.HARBOR_USERNAME }}
20
+ password: ${{ secrets.HARBOR_PASSWORD }}
21
22
+ - uses: actions/checkout@v3
23
+ - name: BuildAndPushImageOnHarbor
24
+ run: |
25
+ docker build ./ -t registry.rcp.epfl.ch/swiss-ai-mmore/mmore:${SHORT_SHA}
26
+ docker push registry.rcp.epfl.ch/swiss-ai-mmore/mmore:${SHORT_SHA}
0 commit comments