diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c5fada2..b4fe5a9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,24 +18,20 @@ jobs: packages: write steps: - - name: Checkout repository - uses: actions/checkout@v2.4.0 - - - name: Log in to the Container registry - uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + - uses: actions/checkout@v3 + - uses: docker/login-action@v2 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + password: ${{ github.token }} - - name: Extract metadata (tags, labels) for the container + - uses: docker/metadata-action@v4 id: meta - uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 with: images: ${{ env.REGISTRY }}/emqx/emqx-schema-validate - name: Build and push docker image - uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + uses: docker/build-push-action@v3 with: context: . push: true diff --git a/Makefile b/Makefile index c4c637a..fe4424b 100644 --- a/Makefile +++ b/Makefile @@ -2,12 +2,10 @@ TAG := mylangtool .PHONY: run run: $(TAG) - docker run --name $(TAG) -d $(TAG) || true - cat ../emqx/_build/emqx/lib/emqx_dashboard/priv/www/static/schema.json | \ - docker exec -i $(TAG) ./emqx_schema_validate - + docker run --name $(TAG) -t --rm -v $(shell pwd)/../emqx/_build/docgen/emqx/schema-en.json:/schema.json -v $(shell pwd)/../emqx/scripts/spellcheck/dicts:/dicts $(TAG) /schema.json .PHONY: $(TAG) -$(TAG): Dockerfile dict/en_spelling_additions.txt rebar.config $(wildcard src/*) +$(TAG): Dockerfile rebar.config $(wildcard src/*) docker build -t $(TAG) . docker kill $(TAG) || true docker rm $(TAG) || true