ci: fix docker build (#6) #16
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Image CI | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1 | |
with: | |
ruby-version: '2.4.4' | |
- name: Build the Docker image | |
env: | |
GATE_SERVER_URL: gate.server/url | |
SIGN_IN_TYPE: '' | |
GATE_OAUTH_CLIENT_ID: totally_secret_client_id | |
GATE_OAUTH_CLIENT_SECRET: totally_secret | |
GATE_HOSTED_DOMAIN: gate.domain | |
GATE_HOSTED_DOMAINS: test1.com,test2.com | |
GATE_DB_HOST: localhost | |
GATE_DB_PORT: 3306 | |
GATE_DB_NAME: '' | |
GATE_DB_USER: root | |
GATE_DB_PASSWORD: '' | |
CACHE_HOST: localhost | |
CACHE_PORT: 6379 | |
SECRET_KEY_BASE: '' | |
SECRET_API_KEY: '' | |
GATE_CONFIG_SECRET: gate_pw_secret | |
USER_ROLES: employee,consultant | |
UID_BUFFER: 5000 | |
DEFAULT_HOST_PATTERN: s* | |
PRODUCT_LIST: pr1,pr2 | |
SAML_APPS: datadog | |
run: | | |
bundle install --without development | |
RAILS_ENV=production bundle exec rake assets:precompile | |
docker build . --file Dockerfile --tag gotocompany/gate:${{ github.ref_name }} | |
- name: Login to DockerHub | |
run: docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Push Docker image | |
run: docker push gotocompany/gate:${{ github.ref_name }} |