-
Notifications
You must be signed in to change notification settings - Fork 279
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7161 from DataDog/bbujon/ci-cloudfoundry
Add Cloud Foundry release automation
- Loading branch information
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Add release to Cloud Foundry | ||
on: | ||
release: | ||
types: | ||
- released | ||
jobs: | ||
update-releases: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout "cloudfoundry" branch | ||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # 4.1.6 | ||
with: | ||
ref: cloudfoundry | ||
- name: Get release version | ||
id: get-release-version | ||
env: | ||
TAG_NAME: ${{ github.event.release.tag_name }} | ||
run: echo "VERSION=$(echo ${TAG_NAME/#v/})" >> $GITHUB_OUTPUT | ||
- name: Append release to Cloud Foundry repository | ||
env: | ||
VERSION: ${{ steps.get-release-version.outputs.VERSION }} | ||
run: | | ||
git checkout -b ci/cloudfoundry | ||
echo "${VERSION}: https://repo1.maven.org/maven2/com/datadoghq/dd-java-agent/${VERSION}/dd-java-agent-${VERSION}.jar" >> index.yml | ||
git add index.yml | ||
git commit -m "chore: Add version ${VERSION} to Cloud Foundry" | ||
git push -u origin ci/cloudfoundry | ||
gh pr create --title "Add version ${VERSION} to Cloud Foundry" --body "This PR add the version ${VERSION} to Cloud Foundry. Make sure [the JAR is online](https://repo1.maven.org/maven2/com/datadoghq/dd-java-agent/${VERSION}/dd-java-agent-${VERSION}.jar) before merging." --base cloudfoundry |