Skip to content

Commit 27e9388

Browse files
authored
Merge pull request #28 from odissei-data/development
Development
2 parents c2114f0 + 903dadb commit 27e9388

2 files changed

Lines changed: 26 additions & 22 deletions

File tree

.github/workflows/image-push.yml

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,34 @@ on:
55
tags:
66
- '*'
77

8+
env:
9+
IMAGE: ghcr.io/odissei-data/metadata-refiner
10+
811
jobs:
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

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,7 @@ RUN chown -R refiner:refiner /app
2121

2222
USER refiner
2323

24+
LABEL org.opencontainers.image.source="https://github.com/odissei-data/metadata-refiner"
25+
LABEL org.opencontainers.image.description="Service to refine and validate metadata structure."
26+
2427
WORKDIR /app/src

0 commit comments

Comments
 (0)