From 3ff35b3f8f925613c551760908854802d4eab274 Mon Sep 17 00:00:00 2001 From: Eugene Burmakin Date: Sun, 7 Apr 2024 22:36:39 +0200 Subject: [PATCH] Remove the permit list from the controller --- .github/workflows/build_and_push.yml | 7 +++---- Makefile | 3 ++- app/controllers/api/v1/points_controller.rb | 5 +---- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build_and_push.yml b/.github/workflows/build_and_push.yml index 6bcddf4c..0f0d1fd9 100644 --- a/.github/workflows/build_and_push.yml +++ b/.github/workflows/build_and_push.yml @@ -1,6 +1,7 @@ name: Docker image build and push on: - workflow_dispatch: + release: + types: [created] jobs: build-and-push-docker: runs-on: ubuntu-latest @@ -17,8 +18,6 @@ jobs: key: ${{ runner.os }}-buildx-${{ github.sha }} restore-keys: | ${{ runner.os }}-buildx- - - name: Echo git tag - run: echo ${{ github.ref }} - name: Login to Docker Hub uses: docker/login-action@v3.1.0 with: @@ -30,7 +29,7 @@ jobs: context: . file: ./Dockerfile push: true - tags: freikin/dawarich:latest,freikin/dawarich:${{ github.run_number }} + tags: freikin/dawarich:latest,freikin/dawarich:${{ github.event.release.tag_name }} platforms: linux/amd64,linux/arm64/v8 cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache diff --git a/Makefile b/Makefile index 63009c5a..eda81f05 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,8 @@ build_and_push: git tag -a "$(version)" -f -m "$(version)" docker build . -t dawarich:$(version) --platform=linux/amd64 - docker tag dawarich:$(version) registry.chibi.rodeo/dawarich:$(version) registry.chibi.rodeo/dawarich:latest + docker tag dawarich:$(version) registry.chibi.rodeo/dawarich:$(version) + docker tag registry.chibi.rodeo/dawarich:$(version) registry.chibi.rodeo/dawarich:latest docker push registry.chibi.rodeo/dawarich:$(version) docker tag freikin/dawarich:$(version) freikin/dawarich:latest docker push freikin/dawarich:$(version) diff --git a/app/controllers/api/v1/points_controller.rb b/app/controllers/api/v1/points_controller.rb index d991a49a..6ec03339 100644 --- a/app/controllers/api/v1/points_controller.rb +++ b/app/controllers/api/v1/points_controller.rb @@ -17,9 +17,6 @@ class Api::V1::PointsController < ApplicationController private def point_params - params.permit( - :lat, :lon, :bs, :batt, :p, :alt, :acc, :vac, :vel, :conn, :SSID, :BSSID, :m, :tid, :tst, - :topic, :_type, :cog, :t, inrids: [], inregions: [], point: {} - ) + params.permit! end end