diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json new file mode 100644 index 0000000..a42b138 --- /dev/null +++ b/.github/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + "chart/tailscale-derp": "0.2.0" +} diff --git a/.github/release-please-config.json b/.github/release-please-config.json new file mode 100644 index 0000000..126e5e3 --- /dev/null +++ b/.github/release-please-config.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "packages": { + "chart/tailscale-derp": { + "release-type": "helm" + } + } +} diff --git a/.github/workflows/charts-publish-oci.yaml b/.github/workflows/charts-publish-oci.yaml new file mode 100644 index 0000000..ed15719 --- /dev/null +++ b/.github/workflows/charts-publish-oci.yaml @@ -0,0 +1,35 @@ +name: "Charts: Publish to GHCR OCI" + +on: + release: + types: [published] + workflow_dispatch: {} + +jobs: + publish-charts: + name: Publish chart + permissions: + contents: write + pull-requests: write + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Install Helm + uses: azure/setup-helm@v4 + + - name: Package & Push Helm Charts + shell: bash + run: | + helm package chart/tailscale-derp --dependency-update + pkg=$(ls tailscale-derp-*.tgz) + helm push "${pkg}" oci://ghcr.io/${{ github.repository }}/chart diff --git a/.github/workflows/charts-release-oci.yaml b/.github/workflows/charts-release-oci.yaml deleted file mode 100644 index 662735a..0000000 --- a/.github/workflows/charts-release-oci.yaml +++ /dev/null @@ -1,49 +0,0 @@ -name: "Charts: Release to GHCR OCI" - -on: - workflow_dispatch: {} - push: - branches: [main] - paths: - - "chart/**/*" - -jobs: - release-charts: - name: Release chart - permissions: - contents: write - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Login to GitHub Container Registry - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Configure Git - run: | - git config user.name "$GITHUB_ACTOR" - git config user.email "$GITHUB_ACTOR@users.noreply.github.com" - - - name: Install Helm - uses: azure/setup-helm@v4 - - - name: Run chart-releaser - uses: helm/chart-releaser-action@v1.6.0 - env: - skip_upload: true - CR_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Push Charts to GHCR - run: | - for pkg in .cr-release-packages/*; do - if [ -z "${pkg:-}" ]; then - break - fi - helm push "${pkg}" oci://ghcr.io/${{ github.repository }}/chart - done diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..6d5e113 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,21 @@ +name: "Release" + +on: + workflow_dispatch: {} + push: + branches: [main] + +jobs: + release: + name: Release + permissions: + contents: write + pull-requests: write + runs-on: ubuntu-22.04 + steps: + - name: release + uses: googleapis/release-please-action@v4 + id: release + with: + config-file: .github/release-please-config.json + manifest-file: .github/.release-please-manifest.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3f5ea5a --- /dev/null +++ b/.gitignore @@ -0,0 +1,37 @@ +# General files for the project +pkg/* +*.pyc +bin/* +.project +/.bin +/_test/secrets/*.json + +# OSX leaves these everywhere on SMB shares +._* + +# OSX trash +.DS_Store + +# Files generated by JetBrains IDEs, e.g. IntelliJ IDEA +.idea/ +*.iml + +# Vscode files +.vscode + +# Emacs save files +*~ +\#*\# +.\#* + +# Vim-related files +[._]*.s[a-w][a-z] +[._]s[a-w][a-z] +*.un~ +Session.vim +.netrwhist + +# Chart dependencies +**/chart/*.tgz + +.history diff --git a/chart/tailscale-derp/values.yaml b/chart/tailscale-derp/values.yaml index 7a8bb26..c08f64c 100644 --- a/chart/tailscale-derp/values.yaml +++ b/chart/tailscale-derp/values.yaml @@ -1,6 +1,4 @@ # Default values for tailscale-derp. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. derpServerHostname: 'derp.foo.bar'