Skip to content

Commit

Permalink
Merge pull request #329 from Scalr/network-mirror-updater
Browse files Browse the repository at this point in the history
do not merge pls
  • Loading branch information
vmotso authored Jul 16, 2024
2 parents 286663e + 28765e8 commit 9615432
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 28 deletions.
13 changes: 8 additions & 5 deletions .github/actions/update-network-mirror/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8178,13 +8178,16 @@ async function main() {

const bucketPath = GCSBucket + '/providers';
if (!dryRun) {
await exec.exec(
'gsutil -m -h "Cache-Control:private, max-age=0, no-transform"'
+ ` rsync -d -r ${MIRROR_DIR}/ ${bucketPath}/`
);
try {
await exec.exec(
'gsutil -m -h "Cache-Control:private, max-age=0, no-transform"'
+ ` rsync -d -r ${MIRROR_DIR}/ ${bucketPath}/`
);
} catch (err) {
console.warn(`Failed to upload file: ${err.message}`)
}
}


console.log('Mirror operation completed successfully.');
} catch (err) {
return core.setFailed(`Failed to update network mirror: ${err.message}.`)
Expand Down
13 changes: 8 additions & 5 deletions .github/actions/update-network-mirror/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,16 @@ async function main() {

const bucketPath = GCSBucket + '/providers';
if (!dryRun) {
await exec.exec(
'gsutil -m -h "Cache-Control:private, max-age=0, no-transform"'
+ ` rsync -d -r ${MIRROR_DIR}/ ${bucketPath}/`
);
try {
await exec.exec(
'gsutil -m -h "Cache-Control:private, max-age=0, no-transform"'
+ ` rsync -d -r ${MIRROR_DIR}/ ${bucketPath}/`
);
} catch (err) {
console.warn(`Failed to upload file: ${err.message}`)
}
}


console.log('Mirror operation completed successfully.');
} catch (err) {
return core.setFailed(`Failed to update network mirror: ${err.message}.`)
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,22 +208,22 @@ jobs:
needs: [lint, unit-tests, acc-tests]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Import GPG key
id: import_gpg
uses: Scalr/[email protected]
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Set Up Cloud SDK
uses: google-github-actions/setup-gcloud@v0
with:
project_id: ${{ secrets.DEV_GCP_PROJECT_ID }}
service_account_key: ${{ secrets.DEV_GCP_SA_KEY }}
export_default_credentials: true
- name: Checkout
uses: actions/checkout@v4
- id: Auth
uses: google-github-actions/auth@v2
with:
fetch-depth: 0
credentials_json: ${{ secrets.DEV_GCP_SA_KEY }}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v2
- name: Create Development Tag
run: |
BRANCH=${{ github.head_ref || github.ref_name }}
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ jobs:
runs-on: ubuntu-latest
environment: release
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Import GPG Key
id: import_gpg
uses: Scalr/[email protected]
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Set Up Cloud SDK
uses: google-github-actions/setup-gcloud@v0
- id: Auth
uses: google-github-actions/auth@v2
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
service_account_key: ${{ secrets.GCP_SA_KEY }}
export_default_credentials: true
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
credentials_json: ${{ secrets.GCP_SA_KEY }}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v2
- name: Set Up Go
uses: actions/setup-go@v5
with:
Expand Down

0 comments on commit 9615432

Please sign in to comment.