Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docker image caching #1036

Merged
merged 4 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-and-publish-asset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ on:

jobs:
call-asset-build:
uses: terascope/workflows/.github/workflows/asset-build-and-publish.yml@73a80a9e19cde53baf8a918e2c7c69bf39ca884a
uses: terascope/workflows/.github/workflows/asset-build-and-publish.yml@f5e098fa861fe7744fa61842e82124f806364be9
secrets: inherit
11 changes: 11 additions & 0 deletions .github/workflows/daily-docker-cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Daily Docker Cache

on:
schedule:
- cron: '0 11 * * 1-5' # Monday - Friday at 4am Arizona Time
workflow_dispatch:

jobs:
call-refresh-docker-cache-workflow:
uses: terascope/workflows/.github/workflows/refresh-docker-cache.yml@f5e098fa861fe7744fa61842e82124f806364be9
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/test-asset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ on:

jobs:
call-asset-test-workflow:
uses: terascope/workflows/.github/workflows/asset-test.yml@73a80a9e19cde53baf8a918e2c7c69bf39ca884a
uses: terascope/workflows/.github/workflows/asset-test.yml@f5e098fa861fe7744fa61842e82124f806364be9
secrets: inherit
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
"build:watch": "tsc --build --watch",
"bump": "ts-scripts bump",
"bump-asset": "ts-scripts bump-asset",
"docker:limit": "./scripts/docker-limit-check.sh",
"docker:listImages": "ts-scripts images list",
"docker:saveImages": "ts-scripts images save",
"lint": "eslint --ignore-path .gitignore --ext .js,.ts .",
"lint:fix": "yarn lint --fix",
"publish:changed": "./scripts/publish.sh",
Expand Down
8 changes: 8 additions & 0 deletions scripts/docker-limit-check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
###
## This checks the docker rate limit
###
TOKEN=$(curl -Ss --user "$USER:$PASS" "https://auth.docker.io/token?service=registry.docker.io&scope=repository:ratelimitpreview/test:pull" | jq -r .token)
result=$(curl -Ss --head -H "Authorization: Bearer $TOKEN" https://registry-1.docker.io/v2/ratelimitpreview/test/manifests/latest)

echo "$result"