Bump ruby/setup-ruby from 1.215.0 to 1.216.0 #45
Workflow file for this run
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
name: Remove Review App | |
concurrency: | |
group: review-${{ github.head_ref }} | |
on: | |
pull_request: | |
types: [closed] | |
jobs: | |
remove-container: | |
if: github.actor != 'github-actions[bot]' && github.actor != 'dependabot[bot]' | |
environment: review | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/[email protected] | |
- name: Set up Ruby | |
uses: ruby/[email protected] | |
with: | |
ruby-version: .ruby-version | |
bundler-cache: true | |
- name: Configure SSH | |
uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
- name: Generate branch slug | |
run: | | |
ref=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} | |
slug=$(echo "$ref" | tr '[:upper:]' '[:lower:]' | tr -c 'a-z0-9' '-') | |
slug=${slug%-} | |
echo "SERVICE_NAME=$slug" >> $GITHUB_ENV | |
- name: Release Kamal lock | |
run: bundle exec kamal lock release | |
- name: Remove Review App with Kamal | |
env: | |
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }} | |
KAMAL_REGISTRY_PASSWORD: ${{ secrets.KAMAL_REGISTRY_PASSWORD }} | |
SERVICE_NAME: ${{ env.SERVICE_NAME }} | |
HOST: ${{ env.SERVICE_NAME }}.review.benefactorum.org | |
run: | | |
bundle exec kamal remove -y -d review | |
bundle exec kamal prune all | |
cleanup-registry: | |
if: github.actor != 'github-actions[bot]' && github.actor != 'dependabot[bot]' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Generate branch slug | |
run: | | |
ref=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} | |
slug=$(echo "$ref" | tr '[:upper:]' '[:lower:]' | tr -c 'a-z0-9' '-') | |
slug=${slug%-} | |
echo "SERVICE_NAME=$slug" >> $GITHUB_ENV | |
- name: Delete Package | |
run: | | |
PACKAGE_NAME=${{ env.SERVICE_NAME }} | |
ORG=benefactorum | |
curl -X DELETE -H "Authorization: Bearer ${{ secrets.KAMAL_REGISTRY_PASSWORD }}" \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
https://api.github.com/orgs/$ORG/packages/container/$PACKAGE_NAME |