ManageIQ/miq_bot

View on GitHub
.github/workflows/build_and_deploy.yml

Summary

Maintainability
Test Coverage
name: Build and Deploy
on:
  push:
    tags:
    - 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
  build_and_deploy:
    if: github.repository_owner == 'ManageIQ'
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - name: Set up Ruby
      uses: ruby/setup-ruby@v1
      with:
        ruby-version: "3.1"
        bundler-cache: true
    - name: Docker login
      run: echo ${{ secrets.DOCKER_REGISTRY_PASSWORD }} | docker login docker.io --password-stdin --username ${{ secrets.DOCKER_REGISTRY_USERNAME }}
    - name: Build
      run: bundle exec rake production:release:build[${{ github.ref_name }}]
    - name: Set up kubectl
      uses: azure/setup-kubectl@v4
    - name: Set up ibmcloud CLI
      uses: IBM/actions-ibmcloud-cli@v1
      with:
        api_key: ${{ secrets.IBMCLOUD_API_KEY }}
        region: us-east
        group: manageiq
        plugins: container-service
    - name: Deploy
      run: bundle exec rake production:release:deploy[${{ github.ref_name }}]