-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 1.28 KB
/
liat.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
50
51
name: Liat Workflow
on:
push:
branches:
- liats/wip/ci_cd
permissions:
id-token: write
contents: read
jobs:
create-conda-env:
runs-on: ubuntu-latest
container:
image: amazonlinux:2
steps:
- name: Show OS version
run: cat /etc/os-release
- name: Check user
run: |
whoami
echo "HOME: $HOME"
echo "GITHUB_WORKSPACE: $GITHUB_WORKSPACE"
echo "PATH: $PATH"
export PATH=$GITHUB_WORKSPACE:$PATH
echo "PATH: $PATH"
- name: Checkout Code
uses: actions/checkout@v2 # Checks out the repository under $GITHUB_WORKSPACE.
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::081569964966:role/github_cicd
aws-region: eu-west-1
# Check the account role and region
- name: Check AWS Account
run: aws sts get-caller-identity
# - name: Create and Upload Artifact to S3
# run: |
# # Example of creating a tar.gz archive and uploading it
# tar -czvf artifact.tar.gz /path/to/your/files
# aws s3 cp artifact.tar.gz s3://YOUR_S3_BUCKET_NAME/path/to/upload/
- name: Cleanup - Terminate EC2 Instance
if: always()
run: |
echo "cleanup"