Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

APIGOV-28015 - add workflow action for nightly testing #107

Merged
merged 1 commit into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/create-tag-for-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ on:
pull_request:
types:
- closed

jobs:
# only run this job if the merge name is "APIGOV-UpdateSDK", which comes from the automated release
# only run this job if the merge name is "APIGOV-UpdateSDKForRelease", which comes from the automated release
if_SDK_update_merged:
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'APIGOV-UpdateSDK')
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'APIGOV-UpdateSDKForRelease')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -20,12 +20,12 @@ jobs:
# by default, this action creates a tag with a 'v' prefix, and bumps the patch version.
# See https://github.com/mathieudutour/github-tag-action to customize these rules.
github_token: ${{ secrets.ACTION_ACCESS_TOKEN }}

- name: Show the new tag
run: |
echo "previous tag ${{ steps.tag_version.outputs.previous_tag }}
echo "new tag ${{ steps.tag_version.outputs.new_tag }}

- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/fully-automated-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ jobs:
id: cpr
uses: peter-evans/create-pull-request@v6
with:
branch: APIGOV-UpdateSDK
branch: APIGOV-UpdateSDKForRelease
commit-message: 'Update to SDK ${{ env.SDK_VERSION }}'
title: 'APIGOV-UpdateSDK - Update to SDK ${{ env.SDK_VERSION }}'
title: 'APIGOV-UpdateSDKForRelease - Update to SDK ${{ env.SDK_VERSION }}'
delete-branch: true
reviewers: dfeldick

- name: Enable Pull Request Automerge
run: gh pr merge APIGOV-UpdateSDK --admin --merge --subject "Merge branch APIGOV-UpdateSDK"
run: gh pr merge APIGOV-UpdateSDKForRelease --admin --merge --subject "Merge branch APIGOV-UpdateSDKForRelease"
env:
GH_TOKEN: ${{ secrets.ACTION_ACCESS_TOKEN }}
45 changes: 45 additions & 0 deletions .github/workflows/update-gomod-for-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Update go.mod for testing

on:
schedule:
- cron: "0 4 * * *" # time is in UTC

jobs:
updateAndCreatePR:
env:
GOFLAGS: "-mod=mod"
GOWORK: "off"
defaults:
run:
working-directory: .
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21

- name: Update SDK version in go.mod
working-directory: .
run: |
make dep-version sdk=main
git config --global user.email [email protected]
git config --global user.name builder-lphxmjtnt11
git commit --allow-empty -m "Updating SDK in go.mod"

- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v6
with:
branch: APIGOV-UpdateSDKForTesting
commit-message: 'Update to SDK for testing'
title: 'APIGOV-UpdateSDKForTesting - Update SDK for testing'
delete-branch: true
reviewers: dfeldick

- name: Enable Pull Request Automerge
run: gh pr merge APIGOV-UpdateSDKForTesting --admin --merge --subject "Merge branch APIGOV-UpdateSDKForTesting"
env:
GH_TOKEN: ${{ secrets.ACTION_ACCESS_TOKEN }}