Skip to content

Commit

Permalink
Merge branch 'master' into protocol-pinning
Browse files Browse the repository at this point in the history
  • Loading branch information
yoannchaudet authored Sep 13, 2024
2 parents 1571e3b + bc11646 commit dfdd080
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Automatically add our team to each pull request in this repo
* @github/pages-reviewers
13 changes: 9 additions & 4 deletions .github/workflows/pages-gem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,24 @@ on:
release:
types: [released]

permissions:
contents: read

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@52753b7da854d5c07df37391a986c76ab4615999 # v1.191.0
with:
ruby-version: '3.2'
- name: Build gem
run: |
gem build github-pages.gemspec
- name: Publish
gem build github-pages-health-check.gemspec
- name: Publish gem
env:
GEM_HOST_API_KEY: ${{ secrets.PAGES_GEM_PUBLISHING }}
run: |
gem push github-pages.gem --key ${{ secrets.PAGES_GEM_PUBLISH }}
gem push github-pages-health-check-*.gem
2 changes: 2 additions & 0 deletions .github/workflows/push-cibuild.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
on: push
name: "GitHub Pages Health Check Tests"
permissions:
contents: read
jobs:
build:
name: "GitHub Pages Health Check Tests"
Expand Down
4 changes: 2 additions & 2 deletions github-pages-health-check.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Gem::Specification.new do |s|

s.add_dependency("addressable", "~> 2.3")
s.add_dependency("dnsruby", "~> 1.60")
s.add_dependency("octokit", ">= 4", "< 9")
s.add_dependency("public_suffix", ">= 3.0", "< 6.0")
s.add_dependency("octokit", ">= 4", "< 10")
s.add_dependency("public_suffix", ">= 3.0", "< 7.0")
s.add_dependency("typhoeus", "~> 1.3")
end
2 changes: 1 addition & 1 deletion lib/github-pages-health-check/domain.rb
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def pages_dot_github_dot_com?

# Is this domain owned by GitHub?
def github_domain?
!!host.downcase.end_with?("github.com")
host.downcase.eql?("github.com") || host.downcase.end_with?(".github.com")
end

# Is the host our Fastly CNAME?
Expand Down
8 changes: 8 additions & 0 deletions spec/github_pages_health_check/domain_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,14 @@
end
end

context "not github domains" do
let(:domain) { "somethinggithub.com" }

it "knows if the domain is not a github domain" do
expect(subject).to_not be_a_github_domain
end
end

context "fastly domain" do
let(:domain) { "github.map.fastly.net" }

Expand Down

0 comments on commit dfdd080

Please sign in to comment.