-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Clean up docker smoke test * Auto merge and auto release depandabot PR's
- Loading branch information
Showing
5 changed files
with
82 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Auto-merge Dependabot | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
branches: | ||
- 'main' | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
|
||
jobs: | ||
auto-merge: | ||
runs-on: ubuntu-latest | ||
if: github.actor == 'dependabot[bot]' | ||
steps: | ||
- uses: tibdex/github-app-token@v1 | ||
id: generate-token | ||
with: | ||
app_id: ${{ secrets.APP_ID }} | ||
private_key: ${{ secrets.APP_PRIVATE_KEY }} | ||
- uses: peter-evans/enable-pull-request-automerge@v3 | ||
with: | ||
token: ${{ steps.generate-token.outputs.token }} | ||
pull-request-number: ${{ github.event.pull_request.number }} | ||
merge-method: squash |
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,27 @@ | ||
name: "Auto Release" | ||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
|
||
jobs: | ||
auto-release: | ||
if: github.event.pull_request.merged == true && github.event.pull_request.user.login == 'dependabot[bot]' | ||
name: "Auto Release" | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- id: get-version | ||
run: | | ||
LATEST_TAG=$(curl -s "https://api.github.com/repos/${GITHUB_REPOSITORY}/releases/latest" | jq -r '.name') | ||
URL='https://gist.githubusercontent.com/mietzen/cd33efb65f91619201a45ac50dcfc29e/raw/bump-version' | ||
echo "version=v$(wget -qO - ${URL} | bash -s ${LATEST_TAG} minor)" >> $GITHUB_OUTPUT | ||
- uses: tibdex/github-app-token@v1 | ||
id: generate-token | ||
with: | ||
app_id: ${{ secrets.APP_ID }} | ||
private_key: ${{ secrets.APP_PRIVATE_KEY }} | ||
- uses: "softprops/action-gh-release@v1" | ||
with: | ||
token: ${{ steps.generate-token.outputs.token }} | ||
tag_name: ${{ steps.get-version.outputs.version }} | ||
generate_release_notes: true |
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,24 @@ | ||
import os | ||
import logging | ||
from time import sleep | ||
from porkbun_ddns import cli | ||
|
||
logger = logging.getLogger('porkbun_ddns') | ||
logger.setLevel(logging.INFO) | ||
logger.propagate = False | ||
|
||
sleep_time = int(os.getenv('SLEEP', 300)) | ||
|
||
logger.info('\n------------------------------------') | ||
logger.info('INTEGRATION TEST!') | ||
logger.info('------------------------------------\n') | ||
while True: | ||
try: | ||
cli.main(argv=['-h']) | ||
except SystemExit: | ||
pass | ||
finally: | ||
logger.info('\n------------------------------------') | ||
logger.info('Sleeping... {}s'.format(sleep_time)) | ||
logger.info('------------------------------------\n') | ||
sleep(sleep_time) |
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