-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (40 loc) · 1.18 KB
/
build_package.yml
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
43
44
45
46
47
48
49
name: Build and Package (Development)
on:
push:
branches: [development]
workflow_dispatch:
env:
AWS_REGION: "us-east-1"
S3BUCKET: "codepipeline-ansible-ktech-br-dev"
permissions:
id-token: write
contents: read
jobs:
ansible-check:
name: Pre-Build
uses: kaio6fellipe/ansible-devops/.github/workflows/check_ansible.yml@development
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
build:
name: Build and Package
needs: ansible-check
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
name: Checkout Repository
- uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.IAMROLE_GITHUB }}
role-session-name: GitHub-Action-Role
aws-region: ${{ env.AWS_REGION }}
- name: Install zip
run: sudo apt-get install -y zip unzip
- name: chmod
run: chmod -R +x ./.github
- name: Build and Package Ansible
id: package
working-directory: .
run: $GITHUB_WORKSPACE/.github/scripts/build.sh
- name: Upload Artifact to s3
working-directory: .
run: aws s3 cp *.zip s3://${{ env.S3BUCKET }}/deploy/