diff --git a/.github/workflows/docker_image.yml b/.github/workflows/docker_image.yml new file mode 100644 index 0000000..de4de94 --- /dev/null +++ b/.github/workflows/docker_image.yml @@ -0,0 +1,30 @@ +name: CI +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + # This job is used to build the Docker image and uses the Dockerfile and .env file + # from the root of the project. + build-and-publish-latest: + runs-on: ubuntu-latest + # if: github.ref == 'refs/heads/master' # Running this job only for master branch + + steps: + - name: Checkout code + uses: actions/checkout@v3 # Checking out the repo + + - name: Build and Publish latest Docker image + uses: docker/build-push-action@v2 + with: + context: . + file: ./Dockerfile + push: true + tags: baseapp:latest + build-args: | + RAILS_ENV=production + RUBY_VERSION=3.1.2 + NODE_VERSION=16.17.1-r0 + YARN_VERSION=1.22.19-r0