From ba40c9d2ce105f24acacf03a137f951db193b314 Mon Sep 17 00:00:00 2001 From: ws-wolfbot Date: Thu, 22 Feb 2024 09:40:36 -0500 Subject: [PATCH] ci: export github actions workflow usage for runs created on 2023-01-12 --- .github/workflows/export-workflow-usage.yml | 22 ++++++++ .github/workflows/main.yml | 58 --------------------- .github/workflows/stale.yml | 20 ------- 3 files changed, 22 insertions(+), 78 deletions(-) create mode 100644 .github/workflows/export-workflow-usage.yml delete mode 100644 .github/workflows/main.yml delete mode 100644 .github/workflows/stale.yml diff --git a/.github/workflows/export-workflow-usage.yml b/.github/workflows/export-workflow-usage.yml new file mode 100644 index 0000000..2b4d5ad --- /dev/null +++ b/.github/workflows/export-workflow-usage.yml @@ -0,0 +1,22 @@ +--- +name: Export Workflow Usage + +# This workflow runs on all pushes to the repo so we can test changes and provide +# fast feedback. +on: + push: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + export_workflow_usage: + name: Export Workflow Usage + uses: wealthsimple/github-workflows/.github/workflows/export_workflow_usage.yml@export-workflow-usage + secrets: inherit + with: + date: '2023-01-12' + s3_bucket: 'dse-hypercube' + s3_key_prefix: 'development/github_actions_runtime_data/2023-01-12' + overwrite_existing_data: false diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index f37c89a..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,58 +0,0 @@ ---- -name: Pipeline -on: - push: -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - build: - name: Build - runs-on: ubuntu-22.04 - strategy: - matrix: - ruby-version: [3.0.6, 3.1.4, 3.2.2] - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Set up Ruby ${{ matrix.ruby-version }} - uses: ruby/setup-ruby@v1 - with: - bundler-cache: true - ruby-version: ${{ matrix.ruby-version }} - - name: Lint - run: bundle exec rubocop - - name: Test - run: bundle exec rspec - - # Separate `release` job from `build`, as we only want release to be run once - # and not run for each ruby version in the matrix: - release: - name: Release - if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' - needs: build - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - bundler-cache: true - - name: Release the gem - run: | - mkdir -p ~/.gem - cat << EOF > ~/.gem/credentials - --- - :github: Bearer ${GITHUB_TOKEN} - :rubygems_api_key: ${RUBYGEMS_API_KEY} - EOF - chmod 0600 ~/.gem/credentials - git config user.email "noreply@wealthsimple.com" - git config user.name "Wolfbot" - bundle exec rake release - env: - RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }} diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml deleted file mode 100644 index bf45be0..0000000 --- a/.github/workflows/stale.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: 'Close stale PRs' -on: - schedule: - - cron: '30 6 1 * *' # 6:30 am UTC: 1:30 am EST on 1st day of the month - -jobs: - stale: - runs-on: ubuntu-22.04 - steps: - - uses: actions/stale@v8 - with: - days-before-stale: 30 - days-before-close: 30 - stale-pr-message: > - This issue has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. - close-pr-message: > - This issue has been automatically closed because it has had no activity - for over 90 days. Please re-open if you feel this was done in error. - exempt-pr-labels: 'dependabot,depfu,dependencies,security'