-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #670 from bitzesty/staging
Production release
- Loading branch information
Showing
213 changed files
with
17,314 additions
and
9,279 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Check for tests or deployment results | ||
on: | ||
workflow_run: | ||
workflows: ["CI"] | ||
types: [completed] | ||
|
||
jobs: | ||
notify-slack: | ||
runs-on: ubuntu-latest | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
steps: | ||
- name: Extract Slack ID for author | ||
id: extract_slack_id | ||
run: | | ||
#!/bin/bash | ||
# user_string="johndoe:U12345678, janedoe:U87654321, alice:U98765432" | ||
user_string="${{ vars.SLACK_USER_IDS }}" | ||
suid="" | ||
IFS=", " read -r -a users <<< "$user_string" | ||
for user in "${users[@]}"; do | ||
IFS=':' read -r github_username slack_user_id <<< "$user" | ||
if [ "$github_username" == "${{github.actor}}" ]; then | ||
suid="$slack_user_id" | ||
break | ||
fi | ||
done | ||
echo "::set-output name=suid::$suid" | ||
- name: tests | ||
uses: ravsamhq/notify-slack-action@v2 | ||
if: ${{ github.event.workflow_run.head_branch != 'main' && github.event.workflow_run.head_branch != 'staging' && github.event.workflow_run.head_branch != 'production' }} | ||
with: | ||
status: ${{ github.event.workflow_run.conclusion }} | ||
notification_title: "Tests ${{github.event.workflow_run.conclusion}} on *${{github.event.workflow_run.head_branch}}* - <${{github.server_url}}/${{github.repository}}/actions/runs/${{github.event.workflow_run.id}}|View ${{github.event.workflow_run.conclusion}}>" | ||
message_format: "{emoji} *${{github.event.workflow_run.name}}* ${{github.event.workflow_run.conclusion}} in <{repo_url}|{repo}>" | ||
footer: "Linked Repo <${{github.server_url}}/${{github.repository}}|${{github.repository}}> | <${{github.server_url}}/${{github.repository}}/actions/runs/${{github.event.workflow_run.id}}|View ${{github.event.workflow_run.conclusion}}>" | ||
mention_users: ${{ steps.extract_slack_id.outputs.suid }} | ||
mention_users_when: "failure,warnings" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2.7.7 | ||
3.2.2 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,30 @@ | ||
ARG RUBY_VERSION=2.7.7 | ||
ARG RUBY_VERSION=3.2.2 | ||
|
||
FROM ruby:2.7.7 | ||
FROM ruby:${RUBY_VERSION} | ||
|
||
ENV HOME=/app | ||
WORKDIR /app | ||
|
||
# ENV SSL_CERT_DIR=/etc/ssl/certs | ||
# ENV SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt | ||
|
||
# Install NodeJS | ||
RUN apt-get update | ||
RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash - | ||
RUN apt-get install -y nodejs | ||
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - | ||
RUN apt-get install -y nodejs npm | ||
RUN npm install yarn -g | ||
|
||
# ENV SSL_CERT_DIR=/etc/ssl/certs | ||
# ENV SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt | ||
|
||
ENV CURL_CONNECT_TIMEOUT=0 CURL_TIMEOUT=0 GEM_PATH="$HOME/vendor/bundle/ruby/${RUBY_VERSION}:$GEM_PATH" LANG=${LANG:-en_US.UTF-8} PATH="$HOME/bin:$HOME/vendor/bundle/bin:$HOME/vendor/bundle/ruby/${RUBY_VERSION}/bin:$PATH" RACK_ENV=${RACK_ENV:-production} RAILS_ENV=${RAILS_ENV:-production} RAILS_SERVE_STATIC_FILES=${RAILS_SERVE_STATIC_FILES:-enabled} SECRET_KEY_BASE=${SECRET_KEY_BASE:-PLACEHOLDERSECRETBASEKEY} | ||
|
||
# Cache bundler | ||
COPY Gemfile /app/Gemfile | ||
COPY Gemfile.lock /app/Gemfile.lock | ||
|
||
RUN bundle config set --local path 'vendor/bundle' | ||
RUN bundle config set --local without 'development test' | ||
RUN bundle install --jobs 4 --retry 3 | ||
|
||
COPY . /app | ||
|
||
|
||
RUN yarn install | ||
RUN RAILS_ENV=production NODE_ENV=production DATABASE_URL=postgresql://localhost/dummy_url bundle exec rake assets:precompile |
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
Oops, something went wrong.