Skip to content

Commit

Permalink
ci: 👷 various fixes to docker publish uniregistrar
Browse files Browse the repository at this point in the history
  • Loading branch information
matteo-cristino committed Dec 1, 2023
1 parent 643ee89 commit a0563ad
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions .github/workflows/docker-publish-uniregistrar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@ jobs:
with:
filters: |
registrar:
- 'contracts/**'
- 'Dockerfile'
- 'package.json'
- 'restroom.mjs'
working-directory: 'universal-registrar'
- 'universal-registrar/**'
set-version:
name: "📌 Set version"
Expand All @@ -34,12 +30,12 @@ jobs:
version: ${{ steps.version.outputs.version }}
steps:
- name: ⬇ install dependecy
run: sudo apt-get install-y skopeo jq
run: sudo apt-get install -y skopeo jq
- name: 📡 get docker version
id: version
run: |
(skopeo inspect docker://docker.io/dyne/did-registrar:0.1 2>/dev/null || echo '{"RepoTags": ["0.0"]}') \
| jq '.RepoTags .[]' \
| jq -r '.RepoTags | .[]' \
| sort -Vr \
| head -n 1 \
| awk 'BEGIN{FS=OFS="."} {$2+=1} { printf("version=%s.%s\n",$1, $2) }' >> $GITHUB_OUTPUT
Expand All @@ -62,16 +58,12 @@ jobs:
with:
images: |
dyne/did-registrar
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
labels: |
org.opencontainers.image.vendor=Dyne.org
- name: 🏗️ Build and push Docker image
uses: docker/build-push-action@v5
with:
context: universal-registrar
file: ./Dockerfile
push: true
tags: ${{ needs.set-version.outputs.version }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit a0563ad

Please sign in to comment.