version: v1.0
name: Trigger calico/go-build update
agent:
  machine:
    type: f1-standard-2
    os_image: ubuntu2204

execution_time_limit:
  minutes: 30

global_job_config:
  secrets:
    - name: private-repo
  prologue:
    commands:
      - chmod 0600 ~/.keys/*
      - ssh-add ~/.keys/*
      - checkout

blocks:
  - name: Auto calico/go-build update
    task:
      secrets:
        - name: marvin-github-token
      jobs:
        - name: Auto calico/go-build update
          env_vars:
            - name: GITHUB_TOKEN
              value: ${MARVIN_GITHUB_TOKEN}
            - name: GIT_COMMIT_EXTRA_FILES
              value: metadata.mk
            - name: GIT_COMMIT_TITLE
              value: "Semaphore Auto go-build Update"
          commands:
            - CONFIRM=true make git-config
            - CONFIRM=true make trigger-auto-pin-update-process
