This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
1.46.2 (#298) #435
Workflow file for this run
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
name: Publish | |
on: push | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Build docker image | |
working-directory: ./tests | |
run: | | |
docker build -f Dockerfile -t test-runner .. | |
docker create --name extract test-runner | |
- name: Run tests | |
run: | | |
docker run test-runner | |
- name: Extract artifacts | |
run: | | |
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 == '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 == 'denoland/deno-lambda' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
files: | | |
deno-lambda-layer.zip | |
deno-lambda-example.zip | |
draft: true | |
publish_deno_lambda: | |
# FIXME prefer to use no_push (in with block) instead of if. | |
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'denoland/deno-lambda' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Get the version | |
id: get_version | |
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | |
- name: Publish Deno Lambda | |
uses: elgohr/Publish-Docker-Github-Action@3.02 | |
with: | |
name: "denoland/deno-lambda" | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
dockerfile: docker/base.dockerfile | |
cache: true | |
tags: "latest,${{ steps.get_version.outputs.VERSION }}" |