forked from JerryBels/lambda-layer-sharp
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (38 loc) · 1.05 KB
/
Copy pathdocker-workflow.yml
File metadata and controls
41 lines (38 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Build Layer ZIP
on:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install dependencies
run: npm install
- name: Variables
id: vars
run: |
sharp_version=$(npm view sharp version)
echo "sharp_version=$sharp_version" >> $GITHUB_OUTPUT
release_exists="true"
git show-ref --tags --quiet --verify -- "refs/tags/$sharp_version" || release_exists="false"
echo "release_exists=$release_exists" >> $GITHUB_OUTPUT
- name: Build
run: npm ci --arch=x64 --platform=linux
- name: Create release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.vars.outputs.sharp_version }}
file: dist/sharp-layer.zip
overwrite: true