Auto_install_Zabbix_Agent/.gitea/workflows/publish.yml
stirelshka8 7b89e3ddac
All checks were successful
Upload to s3 / build_and_deploy (push) Successful in 1m53s
Finish dev CICD
2024-07-19 19:52:48 +03:00

37 lines
1.0 KiB
YAML

name: Upload to s3
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install AwsCli
run: |
sudo apt-get update
sudo apt-get install -y awscli
- name: AwsCli configure
run: |
aws configure set aws_access_key_id ${{ secrets.AWS_ID }}
aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET }}
aws configure set default.region ${{ secrets.AWS_REGION }}
- name: Upload to s3
run: |
TAG="${{ github.ref/refs\/tags\// }}"
aws --endpoint-url=http://${{ secrets.AWS_HOST }} s3 cp ./install_agent.sh s3://release/install_agent_$TAG.sh
- name: Create version file
run: |
TAG="${{ github.ref/refs\/tags\// }}"
echo "$TAG" > version_install_agent.txt
aws --endpoint-url=http://${{ secrets.AWS_HOST }} s3 cp ./version_install_agent.txt s3://doc