-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (40 loc) · 1.14 KB
/
docker-workflow.yml
File metadata and controls
42 lines (40 loc) · 1.14 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
42
name: Build Layer ZIP
on:
push:
branches:
- main
pull_request:
branches:
- main
#schedule:
#- cron: '0 0 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Variables
id: vars
run: |
imagemagick_version=$(grep '^IMAGEMAGICK_VERSION' Makefile | sed 's/.*=//')
echo "imagemagick_version=$imagemagick_version"
echo "imagemagick_version=$imagemagick_version" >> $GITHUB_OUTPUT
- name: Build
id: docker_build
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
tags: imagemagick-aws-lambda-layer:dev
- name: Copy artifacts
run: docker run -v "${{ github.workspace }}/dist":/dist imagemagick-aws-lambda-layer:dev
- name: Create release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.vars.outputs.imagemagick_version }}
file: dist/imagemagick-layer.zip
overwrite: true