ci: add env #13
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: | |
# - '*' | |
on: [push] | |
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_HOSTED_DOMAINS: ${{ secrets.GATE_HOSTED_DOMAINS }} | |
run: | | |
bundle install --without development | |
bundle exec rake assets:precompile RAILS_ENV=production | |
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 }} |