This repository was archived by the owner on Aug 13, 2024. It is now read-only.
Release #128
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
name: Release | |
on: | |
workflow_run: | |
workflows: ["Build and test"] | |
branches: [main] | |
types: | |
- completed | |
permissions: | |
contents: write | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: arnested/go-version-action@v1 | |
id: version | |
- name: Bump version and push tag | |
uses: anothrNick/github-tag-action@1.67.0 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
WITH_V: true | |
DEFAULT_BUMP: patch | |
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} | |
RELEASE_BRANCHES: main | |
- run: echo "go-runtime=$(echo -n go${{ steps.version.outputs.go-mod-version }} | tr -d '.')" >> $GITHUB_OUTPUT | |
id: runtime | |
- uses: google-github-actions/auth@v2 | |
with: | |
credentials_json: '${{ secrets.GCLOUD_AUTH }}' | |
- uses: google-github-actions/deploy-cloud-functions@v2 | |
with: | |
name: ${{ secrets.CF_NAME }} | |
region: ${{ secrets.CF_REGION }} | |
project_id: ${{ secrets.CF_PROJECT }} | |
runtime: ${{ steps.runtime.outputs.go-runtime }} | |
entry_point: "Handle" | |
env_vars: 247964_DOMAIN=${{ secrets.X_247964_DOMAIN }},247964_PASSWORD=${{ secrets.X_247964_PASSWORD }},247964_USERID=${{ secrets.X_247964_USERID }},TOKEN=${{ secrets.TOKEN }},DNSIMPLE_TOKEN=${{ secrets.DNSIMPLE_TOKEN }},NOTIFY=${{ secrets.NOTIFY }} | |
description: ${{ github.repository }} | |
https_trigger_security_level: secure_always | |
memory_mb: 128 | |
- name: Post status to Zulip | |
if: ${{ always() }} | |
uses: containrrr/shoutrrr-action@v1 | |
with: | |
url: "${{ secrets.ZULIP_SHOUTRRR_URL }}?stream=logs&topic=dnssec" | |
message: "Deployed `${{ github.repository }}`@`${{ github.sha }}` to Google Cloud Function `${{ secrets.CF_NAME }}`@`${{ secrets.CF_PROJECT }}`: **${{ job.status }}**." |