Skip to content

test update

test update #12

Workflow file for this run

name: Build and deploy
concurrency:
group: production
cancel-in-progress: true
on:
push:
branches:
- main
jobs:
Deploy:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: 1
RAILS_ENV: production
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.KAMAL_REGISTRY_USER }}
password: ${{ secrets.KAMAL_REGISTRY_PASSWORD }}
- name: Set Tag
id: tag
run: |
echo "tag=$(git rev-parse "$GITHUB_SHA")" >> $GITHUB_OUTPUT
- name: Build image
uses: docker/build-push-action@v5
with:
context: .
builder: ${{ steps.buildx.outputs.name }}
push: true
labels: |
"service=telebugs"
tags: |
"${{ secrets.KAMAL_REGISTRY_USER }}/agave:latest"
"${{ secrets.KAMAL_REGISTRY_USER }}/agave:${{ steps.tag.outputs.tag }}"
cache-from: type=gha
cache-to: type=gha,mode=max
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: 3.2.3
- name: Install kamal
run: gem install kamal
- name: Deploy
run: kamal deploy --skip-push
env:
KAMAL_REGISTRY_PASSWORD: ${{ secrets.KAMAL_REGISTRY_PASSWORD }}