Skip to content

Update plugin-job-restrictions.yml #6332

Update plugin-job-restrictions.yml

Update plugin-job-restrictions.yml #6332

name: Hosting hoster
on:
issue_comment:
types:
- created
- edited
jobs:
validate:
runs-on: ubuntu-latest
if: ${{ github.event.comment.body == '/hosting host' }}
outputs:
actor_in_hosting_team: ${{ steps.checkUserMember.outputs.isTeamMember }}
steps:
- uses: tspascoal/get-user-teams-membership@57e9f42acd78f4d0f496b3be4368fc5f62696662 # v2
id: checkUserMember
with:
username: ${{ github.actor }}
team: 'hosting'
GITHUB_TOKEN: ${{ secrets.HOSTING_PAT }}
hosting:
runs-on: ubuntu-latest
needs: [validate]
if: needs.validate.outputs.actor_in_hosting_team == 'true'
steps:
- name: Ack
uses: actions/github-script@v7
with:
script: |
const {owner, repo} = context.issue
github.rest.reactions.createForIssueComment({
owner,
repo,
comment_id: context.payload.comment.id,
content: "+1",
});
- uses: actions/checkout@v4
with:
ref: 'master'
- uses: actions/setup-java@v4
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '21'
cache: 'maven'
- name: Build with Maven
run: mvn -B package -Dspotbugs.skip
- name: Run hoster
run: |
java -cp target/repository-permissions-updater-1.0-SNAPSHOT-bin/repository-permissions-updater-1.0-SNAPSHOT.jar io.jenkins.infra.repository_permissions_updater.hosting.Hoster ${{ github.event.issue.number }}
env:
GITHUB_OAUTH: ${{ secrets.HOSTING_PAT }}
JIRA_USERNAME: ${{ secrets.JIRA_USERNAME }}
JIRA_PASSWORD: ${{ secrets.JIRA_PASSWORD }}