Skip to content

Commit

Permalink
fix: Try to add messaging directly into names.
Browse files Browse the repository at this point in the history
  • Loading branch information
richtera committed Mar 30, 2023
1 parent 0ddded8 commit 2758d01
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 13 deletions.
27 changes: 15 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -316,24 +316,25 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}

publish_docs:
name: Publish script
name: Publish install script
needs: [notarize_and_pkgbuild, release_please]
runs-on: ubuntu-latest
steps:
- name: Setup | Checkout
- name: Checkout repository
uses: actions/checkout@v3
- name: Download artifacts
- name: Download build artifacts
uses: actions/download-artifact@v3
if: ${{ needs.release_please.outputs.release_created != 'true' }}
with:
path: artifacts

- name: Copy script - bucket
- name: Prepare install.sh with version=${{ needs.release_please.outputs.version_name }}
if: ${{ needs.release_please.outputs.release_created == 'true' }}
run: |
mkdir -p bucket
sed -e "s#__VERSION__#${{ needs.release_please.outputs.version_name }}" install/install.sh > bucket/install.sh
- name: Copy PR scripts - bucket
- name: Prepare install.sh and artifacts with version=${{ needs.release_please.outputs.version_name }} and URL=https://storage.googleapis.com/lks-lz-binaries-euw4${{ needs.release_please.outputs.folder }}
if: ${{ needs.release_please.outputs.release_created != 'true' }}
run: |
mkdir -p bucket
Expand All @@ -352,26 +353,26 @@ jobs:
workload_identity_provider: "projects/311968610280/locations/global/workloadIdentityPools/github/providers/github"
service_account: "artifact-deployer@lks-lz-management.iam.gserviceaccount.com"

- name: Copy files
- name: Copying script and artifacts to gs://lks-lz-binaries-euw4${{ needs.release_please.outputs.folder }}/
run: |-
gcloud auth login --brief --cred-file="${{ steps.gcpauth.outputs.credentials_file_path }}"
echo "gsutil -m cp -r ./bucket/* gs://lks-lz-binaries-euw4${{ needs.release_please.outputs.folder }}/"
gsutil -m cp -r ./bucket/* gs://lks-lz-binaries-euw4${{ needs.release_please.outputs.folder }}/
- name: Add PR status
- name: Add PR status for ${{ github.event.number }} (curl without proxy from https://storage.googleapis.com/lks-lz-binaries-euw4${{ needs.release_please.outputs.folder }}/install.sh)
if: ${{ needs.release_please.outputs.release_created != 'true' }}
uses: marocchino/sticky-pull-request-comment@v2
with:
header: pr-install
message: ":rocket: Deployed preview to `curl https://storage.googleapis.com/lks-lz-binaries-euw4${{ needs.release_please.outputs.folder }}/install.sh | sh`"

# OLD CODE TO DEPLOY TO GH_PAGES
- name: Copy script
- name: Processing script to add version ${{ needs.release_please.outputs.version_name }}
if: ${{ needs.release_please.outputs.release_created == 'true' }}
run: |
mkdir -p dist
sed -e "s#__VERSION__#${{ needs.release_please.outputs.version_name }}" install/install.sh > dist/index.html
- name: Copy PR scripts
- name: Processing script to add version ${{ needs.release_please.outputs.version_name }} and URL https://storage.googleapis.com/lks-lz-binaries-euw4${{ needs.release_please.outputs.folder }}
if: ${{ needs.release_please.outputs.release_created != 'true' }}
run: |
mkdir -p dist
Expand All @@ -381,13 +382,15 @@ jobs:
-e 's#https://storage.googleapis.com/lks-lz-binaries-euw4#https://storage.googleapis.com/lks-lz-binaries-euw4${{ needs.release_please.outputs.folder }}#g' \
-e 's#__VERSION__#${{ needs.release_please.outputs.version_name }}#g' \
install/install.sh > dist/index.html
- name: Deploy
- name: Deploy to Github pages
uses: JamesIves/github-pages-deploy-action@v4
if: ${{ needs.release_please.outputs.release_created == 'true' }}
with:
folder: ./dist
clean-exclude: pr-preview/
- name: Deploy PR

- name: Deploy PR to Github pages
uses: rossjrw/pr-preview-action@v1
with:
source-dir: ./dist
6 changes: 5 additions & 1 deletion .github/workflows/remove.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
types:
- closed

permissions:
id-token: write
contents: write

jobs:
publish_docs:
name: Publish script
Expand All @@ -22,7 +26,7 @@ jobs:
run: |-
gcloud auth login --brief --cred-file="${{ steps.gcpauth.outputs.credentials_file_path }}"
gsutil -m rm -r -f ./bucket/${{ github.event.number }}/*
# NEW CODE TO CLEANUP OLD GH_PAGES
- name: Create dir
run: mkdir -p ./dist
Expand Down

0 comments on commit 2758d01

Please sign in to comment.