Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 2 additions & 75 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
persist-credentials: false

- name: Set up Ruby
uses: ruby/setup-ruby@ae195bbe749a7cef685ac729197124a48305c1cb # v1.276.0
uses: ruby/setup-ruby@708024e6c902387ab41de36e1669e43b5ee7085e # v1.283.0
with:
bundler-cache: true

Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
persist-credentials: false

- name: Set up Ruby
uses: ruby/setup-ruby@ae195bbe749a7cef685ac729197124a48305c1cb # v1.276.0
uses: ruby/setup-ruby@708024e6c902387ab41de36e1669e43b5ee7085e # v1.283.0
with:
bundler-cache: true

Expand Down Expand Up @@ -92,76 +92,3 @@ jobs:
brew install --build-from-source --formula libfaketime
brew install --cask orka
brew install --formula xz

docker:
needs: [style, rspec]
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Set up Git repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false

- name: Set RUBY_VERSION
run: echo RUBY_VERSION="$(cat .ruby-version)" >> "${GITHUB_ENV}"

- uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0

- name: Login to GitHub Packages
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
with:
registry: ghcr.io
username: mikemcquaid
password: ${{ secrets.GITHUB_TOKEN }}

# We don't give Dependabot access to tokens.
- if: github.actor != 'dependabot[bot]'
name: Login to Docker Hub
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
with:
username: mikemcquaid
password: ${{ secrets.DOCKER_TOKEN }}

# Dependabot doesn't have access to push to the GHCR cache
- if: github.actor != 'dependabot[bot]'
name: Set up Docker cache
run: echo DOCKER_CACHE_TO="type=registry,ref=ghcr.io/mikemcquaid/strap:cache,mode=max" >> "${GITHUB_ENV}"

- uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
with:
push: ${{ github.ref == 'refs/heads/main' }}
tags: |
mikemcquaid/strap:latest
mikemcquaid/strap:main
mikemcquaid/strap:master
ghcr.io/mikemcquaid/strap:latest
ghcr.io/mikemcquaid/strap:main
ghcr.io/mikemcquaid/strap:master
cache-from: type=registry,ref=ghcr.io/mikemcquaid/strap:cache
cache-to: ${{ env.DOCKER_CACHE_TO }}
provenance: mode=max
sbom: true
build-args: |
RUBY_VERSION=${{ env.RUBY_VERSION }}

deployment:
if: github.event_name != 'pull_request'
needs: docker
runs-on: ubuntu-latest
timeout-minutes: 30
environment:
name: production
url: https://strap.mikemcquaid.com
concurrency:
group: production
cancel-in-progress: false
steps:
- uses: digitalocean/action-doctl@135ac0aa0eed4437d547c6f12c364d3006b42824 # v2.5.1
with:
token: ${{ secrets.DIGITAL_OCEAN_TOKEN }}

- name: Deploy to DigitalOcean
run: doctl apps create-deployment --wait 5b95141a-ccca-4466-8c8c-501c015fff10
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.0.0
4.0.1
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interestingly, this writes the value installed by Homebrew into .ruby-version, so the Gemfile has to match whatever is the most recent version of the formula.

2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ DEPENDENCIES
tapioca (>= 0.17)

RUBY VERSION
ruby 4.0.0
ruby 4.0.1

BUNDLED WITH
4.0.3
Loading