Skip to content

Commit

Permalink
Merge pull request #179 from humanmade/fix-docker-build
Browse files Browse the repository at this point in the history
Fix builds / release github actions
  • Loading branch information
joehoyle authored Feb 29, 2024
2 parents 1b97ebf + 433911b commit 4b18887
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 37 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Docker Build
on:
push:
branches:
- 'master'
- "**"
tags:
- "*"
- "**"
jobs:
docker:
runs-on: ubuntu-latest
Expand All @@ -14,11 +14,8 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18.x
- uses: aws-actions/setup-sam@v2
with:
use-installer: true
- run: npm install
- run: npm run build
- run: npx tsc
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
Expand All @@ -36,6 +33,7 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push latest
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v2
with:
file: Dockerfile
Expand Down
27 changes: 0 additions & 27 deletions .github/workflows/build.yml

This file was deleted.

11 changes: 9 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: Release
on:
push:
tags:
- "*"
- "**"
branches:
- '**'

jobs:
build:
Expand All @@ -21,7 +23,12 @@ jobs:
- run: npm run build
- run: npm run build-zip
- uses: softprops/action-gh-release@v1
if: github.event_name == 'pull_request'
with:
files: lambda.zip
name: lambda

- uses: actions/upload-artifact@v3
if: github.event_name == 'push' && github.ref_type == 'tag'
with:
path: lambda.zip
name: lambda
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Test

on:
pull_request:
push:
branches:
- '**'

Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"target": "es2020",
"strict": true,
"preserveConstEnums": true,
"noEmit": true,
"sourceMap": false,
"module": "ES2022",
"moduleResolution": "node",
Expand All @@ -13,6 +12,7 @@
"isolatedModules": true,
"types": ["node"],
"resolveJsonModule": true,
"outDir": "dist"
},
"exclude": ["node_modules"],
"include": ["./src/**/*.ts", "./*.d.ts", "./tests/**/*.ts"],
Expand Down

0 comments on commit 4b18887

Please sign in to comment.