55 tags :
66 - ' *'
77
8+ env :
9+ IMAGE : ghcr.io/odissei-data/metadata-refiner
10+
811jobs :
912 push :
1013 name : Push to registry.
1114 runs-on : ubuntu-latest
15+ permissions :
16+ contents : read
17+ packages : write
1218 steps :
1319 - name : Checkout repo
14- uses : actions/checkout@v3
15- - name : Set python version
16- uses : actions/setup-python@v4
17- with :
18- python-version : ' 3.12.5'
19- - name : Install Poetry
20- uses : snok/install-poetry@v1
20+ uses : actions/checkout@v4
21+
22+ - name : Login to GHCR
23+ uses : docker/login-action@v3
2124 with :
22- virtualenvs-create : true
23- virtualenvs-in-project : true
24- installer-parallel : true
25- - name : Get version and tag image
26- run : |
27- poetry_version=$(poetry version | awk '{print $2}')
28- echo "version=${poetry_version}" >> $GITHUB_ENV
29- - name : Login to registry
30- uses : docker/login-action@v2
25+ registry : ghcr.io
26+ username : ${{ github.actor }}
27+ password : ${{ secrets.GITHUB_TOKEN }}
28+
29+ - name : Build and push image
30+ uses : docker/build-push-action@v5
3131 with :
32- username : ${{ secrets.DOCKER_HUB_USERNAME }}
33- password : ${{ secrets.DOCKER_HUB_ACCESS_PASSWORD }}
34- - name : Push to dockerhub
35- run : |
36- docker build . --file Dockerfile --tag odissei/metadata-refiner:${{ env.version }}
37- docker push odissei/metadata-refiner:${{ env.version }}
32+ context : .
33+ file : Dockerfile
34+ push : true
35+ tags : |
36+ ${{ env.IMAGE }}:${{ github.ref_name }}
37+ ${{ env.IMAGE }}:${{ github.sha }}
38+ ${{ env.IMAGE }}:latest
0 commit comments