Class CommonJobDefinition.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • permissions

        @Stability(Experimental)
        public CommonJobDefinition.Builder permissions​(JobPermissions permissions)
        Parameters:
        permissions - You can modify the default permissions granted to the GITHUB_TOKEN, adding or removing access as required, so that you only allow the minimum required access. This parameter is required. Use { contents: READ } if your job only needs to clone code.

        This is intentionally a required field since it is required in order to allow workflows to run in GitHub repositories with restricted default access.

        Returns:
        this
      • concurrency

        @Stability(Experimental)
        public CommonJobDefinition.Builder concurrency​(Object concurrency)
        Parameters:
        concurrency - Concurrency ensures that only a single job or workflow using the same concurrency group will run at a time. A concurrency group can be any string or expression. The expression can use any context except for the secrets context.
        Returns:
        this
      • ifValue

        @Stability(Experimental)
        public CommonJobDefinition.Builder ifValue​(String ifValue)
        Parameters:
        ifValue - You can use the if conditional to prevent a job from running unless a condition is met. You can use any supported context and expression to create a conditional.
        Returns:
        this
      • needs

        @Stability(Experimental)
        public CommonJobDefinition.Builder needs​(List<String> needs)
        Parameters:
        needs - Identifies any jobs that must complete successfully before this job will run. It can be a string or array of strings. If a job fails, all jobs that need it are skipped unless the jobs use a conditional expression that causes the job to continue.
        Returns:
        this