Skip to content

Update pre-commit.yml #44

Update pre-commit.yml

Update pre-commit.yml #44

---
name: run-major-release
on:
workflow_dispatch:
inputs:
version:
description: 'The new version to be set, normally the version in the main branch (semver format: major.0.0)'
required: true
type: string
# Avoid concurrency so we can watch the releases correctly
concurrency:
group: ${{ github.workflow }}
permissions:
contents: read
env:
JOB_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
SLACK_CHANNEL: "#apm-server"
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
release-branch: ${{ steps.prepare.outputs.release-branch }}
release-type: ${{ steps.prepare.outputs.release-type }}
release-version: ${{ steps.prepare.outputs.release-version }}
slack-thread: ${{ steps.prepare.outputs.slack-thread }}
steps:
- uses: actions/checkout@v4
- id: prepare
uses: ./.github/workflows/prepare-release
with:
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
version: ${{ inputs.version }}
type: 'major'
run-major:
runs-on: ubuntu-latest
needs: [ prepare ]
env:
RELEASE_BRANCH: ${{ needs.prepare.outputs.release-branch }}
RELEASE_TYPE: ${{ needs.prepare.outputs.release-type }}
RELEASE_VERSION: ${{ needs.prepare.outputs.release-version }}
permissions:
contents: write
steps:
<<<<<<< HEAD

Check failure on line 51 in .github/workflows/run-major-release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/run-major-release.yml

Invalid workflow file

You have an error in your yaml syntax on line 51
- uses: elastic/oblt-actions/slack/send@31e93d1dfb82adc106fc7820f505db1afefe43b1 # v1
=======
- uses: elastic/oblt-actions/slack/send@v1
>>>>>>> 0e1f32a6 (ci: revert image pinning for internal and github actions (#17191))
with:
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
channel-id: ${{ env.SLACK_CHANNEL }}
message: |-
Feature freeze for `${{ github.repository }}@${{ env.RELEASE_VERSION }}` just started.
The `${{ github.repository }}@${{ env.RELEASE_BRANCH }}` branch will be created Today.
thread-timestamp: ${{ needs.prepare.outputs.slack-thread || '' }}
- name: Get token
id: get_token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
with:
app_id: ${{ secrets.OBS_AUTOMATION_APP_ID }}
private_key: ${{ secrets.OBS_AUTOMATION_APP_PEM }}
permissions: >-
{
"contents": "write",
"pull_requests": "write"
}
- uses: actions/checkout@v4
with:
# 0 indicates all history for all branches and tags.
fetch-depth: 0
# Required to use a service account, otherwise PRs created by
# GitHub bot won't trigger any CI builds.
# See https://github.com/peter-evans/create-pull-request/issues/48#issuecomment-537478081
- name: Configure git user
<<<<<<< HEAD
uses: elastic/oblt-actions/git/setup@31e93d1dfb82adc106fc7820f505db1afefe43b1 # v1
=======
uses: elastic/oblt-actions/git/setup@v1
>>>>>>> 0e1f32a6 (ci: revert image pinning for internal and github actions (#17191))
with:
github-token: ${{ steps.get_token.outputs.token }}
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@cb9bde2e2525e640591a934b1fd28eef1dcaf5e5 # v6.2.0
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
- run: make major-release
env:
GH_TOKEN: ${{ steps.get_token.outputs.token }}
- if: success()
<<<<<<< HEAD
uses: elastic/oblt-actions/slack/send@31e93d1dfb82adc106fc7820f505db1afefe43b1 # v1
=======
uses: elastic/oblt-actions/slack/send@v1
>>>>>>> 0e1f32a6 (ci: revert image pinning for internal and github actions (#17191))
with:
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
channel-id: ${{ env.SLACK_CHANNEL }}
message: |-
`${{ github.repository }}@${{ env.RELEASE_BRANCH }}` is now available.
The docs and other references are updated. You can start using it.
thread-timestamp: ${{ needs.prepare.outputs.slack-thread || '' }}
- if: failure()
<<<<<<< HEAD
uses: elastic/oblt-actions/slack/send@31e93d1dfb82adc106fc7820f505db1afefe43b1 # v1
=======
uses: elastic/oblt-actions/slack/send@v1
>>>>>>> 0e1f32a6 (ci: revert image pinning for internal and github actions (#17191))
with:
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
channel-id: ${{ env.SLACK_CHANNEL }}
message: |-
:fire: Something went wrong with the release. See <${{ env.JOB_URL }}|logs>.
thread-timestamp: ${{ needs.prepare.outputs.slack-thread || '' }}