Skip to content

Commit

Permalink
Change to use PAT
Browse files Browse the repository at this point in the history
Signed-off-by: Ruben Vargas <[email protected]>
  • Loading branch information
rubenvp8510 committed Nov 14, 2023
1 parent 1e439c8 commit d2fd6fb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 19 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,25 +56,27 @@ jobs:
'dist/tempo-operator.yaml#Installation manifest for Kubernetes' \
operator-hub-prod-release:
if: |
github.event.pull_request.merged == true && github.event.pull_request.head.repo.full_name == github.repository
&& github.event.pull_request.user.login == 'github-actions[bot]' && github.event.pull_request.user.type == 'Bot'
needs: release
uses: ./.github/workflows/reusable-operator-hub-release.yaml
with:
org: redhat-openshift-ecosystem
repo: community-operators-prod
version: ${{inputs.version}}
secrets:
PUBLISH_APP_ID: ${{ secrets.PUBLISH_APP_ID }}
PUBLISH_APP_PRIVATE_KEY: ${{ secrets.PUBLISH_APP_PRIVATE_KEY }}
PUBLISH_APP_INSTALLATION_ID: ${{ secrets.PUBLISH_APP_INSTALLATION_ID }}
TEMPOOPERATORBOT_GITHUB_TOKEN: ${{ secrets.TEMPOOPERATORBOT_GITHUB_TOKEN }}

operator-hub-community-release:
if: |
github.event.pull_request.merged == true && github.event.pull_request.head.repo.full_name == github.repository
&& github.event.pull_request.user.login == 'github-actions[bot]' && github.event.pull_request.user.type == 'Bot'
needs: release
uses: ./.github/workflows/reusable-operator-hub-release.yaml
with:
org: k8s-operatorhub
repo: community-operators
version: ${{inputs.version}}
secrets:
PUBLISH_APP_ID: ${{ secrets.PUBLISH_APP_ID }}
PUBLISH_APP_PRIVATE_KEY: ${{ secrets.PUBLISH_APP_PRIVATE_KEY }}
PUBLISH_APP_INSTALLATION_ID: ${{ secrets.PUBLISH_APP_INSTALLATION_ID }}
TEMPOOPERATORBOT_GITHUB_TOKEN: ${{ secrets.TEMPOOPERATORBOT_GITHUB_TOKEN }}
16 changes: 3 additions & 13 deletions .github/workflows/reusable-operator-hub-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,15 @@ on:
type: string
required: true
secrets:
PUBLISH_APP_ID:
required: true
PUBLISH_APP_PRIVATE_KEY:
TEMPOOPERATORBOT_GITHUB_TOKEN:
required: true
jobs:
create-operator-pull-request:
runs-on: ubuntu-latest
steps:
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.PUBLISH_APP_ID }}
private_key: ${{ secrets.PUBLISH_APP_PRIVATE_KEY }}
installation_retrieval_payload: ${{ secrets.PUBLISH_APP_INSTALLATION_ID }}
installation_retrieval_mode: id
- name: Sync fork
env:
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
GH_TOKEN: ${{ secrets.TEMPOOPERATORBOT_GITHUB_TOKEN }}
run: |
# synchronizing the fork is fast, and avoids the need to fetch the full upstream repo
# (fetching the upstream repo with "--depth 1" would lead to "shallow update not allowed"
Expand Down Expand Up @@ -69,7 +59,7 @@ jobs:
- name: Create pull request against ${{ inputs.org }}/${{ inputs.repo }}
env:
VERSION: ${{ inputs.version }}
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
GH_TOKEN: ${{ secrets.TEMPOOPERATORBOT_GITHUB_TOKEN }}
run: |
message="Update the tempo to $VERSION"
body="Release tempo-operator \`$VERSION\`.
Expand Down

0 comments on commit d2fd6fb

Please sign in to comment.