This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Igor Zinkovsky
committed
Feb 9, 2024
1 parent
e464ccf
commit a967c82
Showing
40 changed files
with
37 additions
and
2,669 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,57 +18,24 @@ jobs: | |
docker cp extract:/src/runtime/deno-lambda-layer.zip deno-lambda-layer.zip | ||
docker cp extract:/src/runtime/deno-lambda-example.zip deno-lambda-example.zip | ||
- name: Verify Release Version Matches Deno Version | ||
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'hayd/deno-lambda' | ||
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'denoland/deno-lambda' | ||
run: | | ||
export DENO_LAMBDA_VERSION=$(echo $GITHUB_REF | tr / '\n' | tail -n 1) | ||
docker run -e DENO_LAMBDA_VERSION=$DENO_LAMBDA_VERSION test-runner _deno test --allow-env /src/tests/version_check.ts | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'hayd/deno-lambda' | ||
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'denoland/deno-lambda' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
files: | | ||
deno-lambda-layer.zip | ||
deno-lambda-example.zip | ||
draft: true | ||
- name: Publish to SAR | ||
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'hayd/deno-lambda' | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
DENO_LAMBDA_BUCKET: ${{ secrets.DENO_LAMBDA_BUCKET }} | ||
run: | | ||
export DENO_LAMBDA_VERSION=$(echo $GITHUB_REF | tr / '\n' | tail -n 1) | ||
echo tag: $DENO_LAMBDA_VERSION | ||
# FIXME: Installation of sam is fiddly. | ||
export DEBIAN_FRONTEND=noninteractive | ||
sudo apt -qq update &> /dev/null | ||
sudo apt -qq install -y awscli python3-setuptools python3-testresources &> /dev/null | ||
pip3 -q install -U --force pip | ||
export PATH=/home/runner/.local/bin:$PATH | ||
export SAM_CLI_TELEMETRY=1 | ||
python3 -m pip -q install --user aws-sam-cli | ||
export AWS_EC2_METADATA_DISABLED=true | ||
aws s3 cp --quiet deno-lambda-layer.zip s3://$DENO_LAMBDA_BUCKET/deno-lambda-layer_$DENO_LAMBDA_VERSION.zip --acl public-read | ||
aws s3 cp --quiet deno-lambda-example.zip s3://$DENO_LAMBDA_BUCKET/deno-lambda-example_$DENO_LAMBDA_VERSION.zip --acl public-read | ||
echo --- | ||
cd SAR | ||
sed -i -e s/DENO_LAMBDA_BUCKET/$DENO_LAMBDA_BUCKET/g template.yml | ||
sed -i -e s/DENO_LAMBDA_VERSION/$DENO_LAMBDA_VERSION/g template.yml | ||
cat template.yml | ||
sam publish --region us-east-1 | ||
echo --- | ||
cd blueprint | ||
sed -i -e s/DENO_LAMBDA_BUCKET/$DENO_LAMBDA_BUCKET/g template.yml | ||
sed -i -e s/DENO_LAMBDA_VERSION/$DENO_LAMBDA_VERSION/g template.yml | ||
cat template.yml | ||
sam publish --region us-east-1 | ||
echo --- | ||
|
||
publish_deno_lambda: | ||
# FIXME prefer to use no_push (in with block) instead of if. | ||
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'hayd/deno-lambda' | ||
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'denoland/deno-lambda' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
|
@@ -78,7 +45,7 @@ jobs: | |
- name: Publish Deno Lambda | ||
uses: elgohr/[email protected] | ||
with: | ||
name: "hayd/deno-lambda" | ||
name: "denoland/deno-lambda" | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
dockerfile: docker/base.dockerfile | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.