Browse Source

Create public release and update install script (#11)

Mauricio Araujo 2 năm trước cách đây
mục cha
commit
b26442e21b

+ 17 - 4
.github/workflows/release.yaml

@@ -1,7 +1,7 @@
 on:
   release:
     types: [released]
-name: Update binaries 
+name: Update binaries
 jobs:
   update-self-hosted-helm-registry:
     runs-on: ubuntu-latest
@@ -14,7 +14,20 @@ jobs:
       - name: Run workflow
         run: gh workflow run release.yaml --repo porter-dev/porter-self-hosted -f version=${{steps.tag_name.outputs.tag}}
         env:
-          GITHUB_TOKEN: ${{ secrets.PORTER_DEV_GITHUB_TOKEN }}  
+          GITHUB_TOKEN: ${{ secrets.PORTER_DEV_GITHUB_TOKEN }}
+  update-public-repo:
+    runs-on: ubuntu-latest
+    steps:
+      - name: Get tag name
+        id: tag_name
+        run: echo "tag=${GITHUB_TAG/refs\/tags\//}" >> $GITHUB_OUTPUT
+        env:
+          GITHUB_TAG: ${{ github.ref }}
+      - name: Create release in public repo
+        run: |
+          gh release create ${{steps.tag_name.outputs.tag}} *_${{steps.tag_name.outputs.tag}}*.zip --repo porter-dev/porter-archive
+        env:
+          GITHUB_TOKEN: ${{ secrets.PORTER_DEV_GITHUB_TOKEN }}
   push-docker-server-latest:
     runs-on: ubuntu-latest
     steps:
@@ -86,11 +99,11 @@ jobs:
           class Porter < Formula
             homepage "https://porter.run"
             version "${{steps.tag_name.outputs.tag}}"
-          
+
             on_macos do
               url "https://github.com/porter-dev/porter/releases/download/${{steps.tag_name.outputs.tag}}/porter_${{steps.tag_name.outputs.tag}}_Darwin_x86_64.zip"
               sha256 "$sha"
-          
+
               def install
                 bin.install "porter"
               end

+ 1 - 1
services/cli_install_script_container/install.sh

@@ -21,7 +21,7 @@ download_and_install() {
         porter_version="$PORTER_VERSION"
     fi
 
-    curl -L "https://github.com/porter-dev/porter/releases/download/${porter_version}/porter_${porter_version}_${osname}_x86_64.zip" --output porter.zip
+    curl -L "https://github.com/porter-dev/porter-archive/releases/download/${porter_version}/porter_${porter_version}_${osname}_x86_64.zip" --output porter.zip
     unzip -o -a porter.zip
     rm porter.zip