Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent "Blocked host:" message #336

Merged
merged 4 commits into from Oct 2, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 10 additions & 8 deletions .github/workflows/docker.yml
Expand Up @@ -2,7 +2,7 @@ name: Docker

on:
push:
branches: master
branches: main

jobs:
docker:
Expand All @@ -26,22 +26,24 @@ jobs:

- name: Login to Github Packages
uses: docker/login-action@v1
env:
GHCR_TOKEN: ${{ secrets.GHCR_TOKEN }}
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_TOKEN }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: lowercase repo name for tag
uses: ASzc/change-string-case-action@v1
id: reponame
with:
string: ghcr.io/${{ github.repository }}

- name: Build
id: docker_build
uses: docker/build-push-action@v2
env:
GHCR_TOKEN: ${{ secrets.GHCR_TOKEN }}
with:
push: true
tags: |
ghcr.io/syncforynab/fintech-to-ynab:sha_${{ github.sha }}
ghcr.io/syncforynab/fintech-to-ynab:latest
${{ steps.reponame.outputs.lowercase }}:sha_${{ github.sha }}
${{ steps.reponame.outputs.lowercase }}:latest
cache-from: type=local,src=/tmp/.docker-buildx-cache
cache-to: type=local,dest=/tmp/.docker-buildx-cache
6 changes: 6 additions & 0 deletions config/environments/development.rb
Expand Up @@ -38,4 +38,10 @@
# Use an evented file watcher to asynchronously detect changes in source code,
# routes, locales, etc. This feature depends on the listen gem.
config.file_watcher = ActiveSupport::EventedFileUpdateChecker

# Prevent "Blocked host: hostname"
if !ENV["APP_HOSTNAME"].nil?
PromoFaux marked this conversation as resolved.
Show resolved Hide resolved
config.hosts << ENV["APP_HOSTNAME"]
end

end