Skip to content

Commit 46746e0

Browse files
authored
fix: use lower case owner (#1487)
* fix: use lower case owner * add label
1 parent d111104 commit 46746e0

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

.github/workflows/push-images.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
workflow_dispatch:
99

1010
env:
11-
IMAGE_NAME: eur-dev-env
11+
IMAGE_NAME: pypsa/eur-dev-env
1212
BASE_ENV: envs/linux-pinned.yaml
1313

1414
jobs:
@@ -35,18 +35,18 @@ jobs:
3535
- name: 'Build new image' # only build if the pinned envs file was modified
3636
if: env.hash_last_changed == github.sha || github.event_name == 'workflow_dispatch'
3737
run: |
38-
docker build . --file docker/dev-env/Dockerfile --tag ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
39-
docker push ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
38+
docker build . --file docker/dev-env/Dockerfile --tag ghcr.io/${{ env.IMAGE_NAME }}:${{ github.sha }}
39+
docker push ghcr.io/${{ env.IMAGE_NAME }}:${{ github.sha }}
4040
4141
# Add latest tag if on main branch
4242
if [ "${{ github.ref }}" == "refs/heads/master" ]; then
43-
docker tag ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ github.sha }} ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest
44-
docker push ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest
43+
docker tag ghcr.io/${{ env.IMAGE_NAME }}:${{ github.sha }} ghcr.io/${{ env.IMAGE_NAME }}:latest
44+
docker push ghcr.io/${{ env.IMAGE_NAME }}:latest
4545
fi
4646
4747
- name: 'Add SHA tag to existing image' # when rebuild is not needed
4848
if: env.hash_last_changed != github.sha
4949
run: |-
50-
docker pull ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.hash_last_changed }}
51-
docker tag ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.hash_last_changed }} ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
52-
docker push ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
50+
docker pull ghcr.io/${{ env.IMAGE_NAME }}:${{ env.hash_last_changed }}
51+
docker tag ghcr.io/${{ env.IMAGE_NAME }}:${{ env.hash_last_changed }} ghcr.io/${{ env.IMAGE_NAME }}:${{ github.sha }}
52+
docker push ghcr.io/${{ env.IMAGE_NAME }}:${{ github.sha }}

docker/dev-env/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
FROM condaforge/mambaforge
66

7+
LABEL org.opencontainers.image.source https://github.com/PyPSA/pypsa-eur
8+
79
RUN conda update -n base conda
810
RUN conda install -n base conda-libmamba-solver
911
RUN conda config --set solver libmamba

0 commit comments

Comments
 (0)