Auto_install_Zabbix_Agent/.gitea/workflows/publish.yml
stirelshka8 e1e9e7f7a0
All checks were successful
Upload to s3 / Upload-to-s3 (push) Successful in 2m8s
UPD CDCI 5
2024-07-20 11:03:22 +03:00

42 lines
1.1 KiB
YAML

name: Upload to s3
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
Upload-to-s3:
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 }}"
TAG="${TAG#refs/tags/}"
TAG="${TAG#v}"
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 }}"
TAG="${TAG#refs/tags/}"
TAG="${TAG#v}"
echo "$TAG" > versionagent.txt
aws --endpoint-url=http://${{ secrets.AWS_HOST }} s3 cp ./versionagent.txt s3://doc