Skip to content

Action to automatically create tag in a forked repo for the latest upstream release

License

Notifications You must be signed in to change notification settings

DataDog/sync-upstream-release-tag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sync-upstream-release-tag

Action to automatically create tag in a forked repo for the latest upstream release.

It relies on the presence of a last-dd-base tag in the branch to find your latest commit and rebase them on top of the latest commits from upstream. It tags the new branch with a new tag according to the schema below: sync workflow

Usage

  1. Add a secret called WORKFLOW_TOKEN with write access to your repository. This must be a personal github access token with at least the repo and workflow permissions (the scope to update the Github Actions is needed in case the upstream repo modifies its own actions): token_scope
  2. If your org enforces the use of SSO, you must authorize your token
  3. Add this workflow definition to a .github/workflows/sync.yaml file in your fork:
name: Sync upstream
# This runs every day on 1000 UTC
on:
  schedule:
    - cron: '0 10 * * *'
  # Allows manual workflow run
  workflow_dispatch:

permissions: write-all

jobs:
 build:
  runs-on: ubuntu-latest
  steps:
    - name: Create upstream version tag
      uses: DataDog/sync-upstream-release-tag@v0.1.0
        with:
          github_actor: "${GITHUB_ACTOR}"
          github_repository: "${GITHUB_REPOSITORY}"
          # The token need to have write-all access on the repo for the rebase
          # so we cannot use the action's default token
          github_token: ${{ secrets.WORKFLOW_TOKEN }}
          upstream_repo: kubernetes-sigs/gcp-compute-persistent-disk-csi-driver

Additional configuration flags are available if needed. Check the action directly to see them.

About

Action to automatically create tag in a forked repo for the latest upstream release

Resources

License

Stars

Watchers

Forks

Packages

No packages published