diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 19ca80be7..b5566aaf2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,13 @@ name: CI -on: [push] +on: + push: + paths: + - 'webapp/golang/**' + - 'webapp/ruby/**' + - 'webapp/php/**' + - 'benchmarker/**' + - 'Makefile' jobs: build-and-test: @@ -34,17 +41,9 @@ jobs: run: make init - name: Check for changes in golang directory - id: check-changes + if: contains(github.event.pull_request.changed_files, 'webapp/golang/') run: | - if git diff --name-only ${{ github.sha }} | grep 'golang/'; then - echo "Changes detected in golang directory" - echo "::set-output name=go_changes_detected::true" - fi - - - name: Update compose.yml if changes are detected - if: steps.check-changes.outputs.go_changes_detected == 'true' - run: | - sed -i 's|build: ruby/|build: golang/|' ./webapp/compose.yml + sed -i 's|build: ruby/|build: golang/|' ./webapp/docker-compose.yml - name: Start the server run: | diff --git a/webapp/golang/Dockerfile b/webapp/golang/Dockerfile index 7bb5da6d9..57cb6d106 100644 --- a/webapp/golang/Dockerfile +++ b/webapp/golang/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.21 +FROM golang:1.22 RUN mkdir -p /home/webapp WORKDIR /home/webapp