Skip to content
Open
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
73 changes: 0 additions & 73 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
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
Loading