ToolJet/.github/workflows/packer-build.yml
Kavin Venkatachalam 1efcec9e09
[Feature]: Update Node from 14 to 18 (#5393)
* Updated package.json to support node 18

* Updated package-lock.json with force install

* Updated frontend package.json

* Updated server package.json

* update frontend package-lock.json

* update render dockerfile

* update dockerfiles for node 18

* update node version in actions

* fix setup script for AMI

* install using nvm

* debug

* source bashrc

* change ami os version

* change base ami

* make use of ubuntu focal lts version

* update script

* change branch name

* revert branch name

* update workflow

* node upgrade [plugins] modules updated (#5482)

* modules updated

* adds saphana and oracle package

* adds saphana and oracle package

* eslint rules for -unresolved and resolved properties

---------

Co-authored-by: Akshay Sasidharan <akshaysasidharan93@gmail.com>
Co-authored-by: Arpit <arpitnath42@gmail.com>
2023-02-06 17:38:44 +05:30

63 lines
1.7 KiB
YAML

name: AWS AMI build using Packer config
on:
release:
types: [published]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
version:
description: "RELEASE_VERSION"
jobs:
packer:
runs-on: ubuntu-latest
name: packer
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setting tag
if: "${{ github.event.inputs.version != '' }}"
run: echo "RELEASE_VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
- name: Set evn
if: "${{ github.event.release }}"
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-1
# Initialize Packer templates
- name: Initialize Packer Template
uses: hashicorp/packer-github-actions@master
with:
command: init
target: .
working_directory: deploy/ec2
# validate templates
- name: Validate Template
uses: hashicorp/packer-github-actions@master
with:
command: validate
arguments: -syntax-only
target: .
working_directory: deploy/ec2
# build artifact
- name: Build Artifact
uses: hashicorp/packer-github-actions@master
with:
command: build
arguments: -color=false -on-error=abort -var ami_name=tooljet_${{ env.RELEASE_VERSION }}.ubuntu_focal
target: .
working_directory: deploy/ec2
env:
PACKER_LOG: 1