Skip to content

Commit

Permalink
finalize the docker tag and push
Browse files Browse the repository at this point in the history
  • Loading branch information
unkcpz committed Nov 4, 2023
1 parent 58e074a commit 0806377
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 35 deletions.
4 changes: 2 additions & 2 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#FROM aiidateam/aiida-core-with-services:edge
FROM aiidateam/aiida-core-with-services:newly-baked
#FROM ghcr.io/aiidateam/aiida-core-with-services:edge
FROM ghcr.io/aiidateam/aiida-core-with-services:pr-6170

USER root

Expand Down
58 changes: 25 additions & 33 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,38 +52,30 @@ jobs:
- name: Run tests ✅
run: TAG=newly-baked python -m pytest -s tests

#- name: Docker meta 📝
# id: meta
# uses: docker/metadata-action@v4
# env: ${{ fromJson(steps.build_vars.outputs.vars) }}
# with:
# images: |
# name=${{ inputs.registry }}/${{ env.OWNER }}/${{ matrix.image }}
# tags: |
# type=edge,enable={{is_default_branch}}
# type=sha,enable=${{ github.ref_type != 'tag' }}
# type=ref,event=pr
# type=match,pattern=v(\d+\.\d+.\d+),group=1
# type=raw,value={{tag}},enable=${{ startsWith(github.ref, 'refs/tags/v') }}
# type=raw,value=python-${{ env.PYTHON_VERSION }},enable=${{ startsWith(github.ref, 'refs/tags/v') }}
# type=raw,value=postgresql-${{ env.PGSQL_VERSION }},enable=${{ startsWith(github.ref, 'refs/tags/v') }}

#- name: Login to Container Registry 🔑
# uses: docker/login-action@v2
# with:
# registry: ${{ inputs.registry }}
# username: ${{ secrets.REGISTRY_USERNAME }}
# password: ${{ secrets.REGISTRY_TOKEN }}
- name: Docker meta 📝
id: meta
uses: docker/metadata-action@v4
with:
images: |
name=ghcr.io/aiidateam/aiida-quantumespresso
tags: |
type=edge,enable={{is_default_branch}}
type=sha,enable=${{ github.ref_type != 'tag' }}
type=ref,event=pr
type=match,pattern=v(\d+\.\d+.\d+),group=1
type=raw,value={{tag}},enable=${{ startsWith(github.ref, 'refs/tags/v') }}
#- name: Set tags for image and push 🏷️📤💾
# run: |
# declare -a arr=(${{ steps.meta.outputs.tags }})
# for tag in "${arr[@]}"; do
# arch_tag=$(echo ${tag} | sed "s/:/:${{ inputs.architecture }}-/")
# docker tag ${{ env.OWNER }}/${{ matrix.image }}:newly-baked ${arch_tag}
# docker push ${arch_tag}
- name: Login to Container Registry 🔑
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# # write tag to file
# mkdir -p /tmp/aiida-core
# echo ${arch_tag} >> /tmp/aiida-core/${{ matrix.image }}-${{ inputs.architecture }}-tags.txt
# done
- name: Set tags for image and push 🏷️📤💾
run: |
declare -a arr=(${{ steps.meta.outputs.tags }})
for tag in "${arr[@]}"; do
docker tag aiidateam/aiida-quantumespresso:newly-baked ${tag}
docker push ${tag}
done

0 comments on commit 0806377

Please sign in to comment.