Skip to content

Update external libs #332

Update external libs

Update external libs #332

Workflow file for this run

name: Update external libs
on:
# Triggers the workflow every day
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
permissions:
contents: read
jobs:
sync-libs:
if: github.repository_owner == 'rh-ecosystem-edge'
permissions:
contents: write # for peter-evans/create-pull-request to create branch
pull-requests: write # for peter-evans/create-pull-request to create a PR
outputs:
pr-url: ${{ steps.create-pr.outputs.pull-request-url }}
runs-on: ubuntu-22.04
env:
SHELL: /bin/bash
steps:
- uses: actions/checkout@v5
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Run sync script
run: make lib-sync
- name: Create PR
id: create-pr
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
env:
GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_KEY }}
with:
commit-message: "sync: update external libs"
author: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com>
title: Sync update external libs
body: |
Sync update external libs generated by [this CI run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}).
branch: sync
delete-branch: true
makefile:
needs: sync-libs
uses: ./.github/workflows/makefile.yml
with:
branch: sync
gotests:
needs: sync-libs
uses: ./.github/workflows/eco-gotests-integration.yml
with:
branch: sync
integration:
needs: sync-libs
uses: ./.github/workflows/integration-testing.yml
with:
branch: sync
label:
needs: [sync-libs, makefile, gotests, integration]
if: ${{ !cancelled() && needs.sync-libs.result == 'success' && needs.sync-libs.outputs.pr-url }}
name: Label created PR
permissions:
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Label PR based on CI result
run: gh pr edit ${{ needs.sync-libs.outputs.pr-url }} --add-label ci/$CI_RESULT
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CI_RESULT: ${{ (needs.makefile.result == 'success' && needs.gotests.result == 'success' && needs.integration.result == 'success') && 'success' || 'failure' }}