Auto_install_Zabbix_Agent/.gitea/workflows/publish.yml
stirelshka8 3b7c0f33a7
All checks were successful
Upload to s3 / Upload-to-s3 (push) Successful in 2m2s
UPD CDCI 4
2024-07-20 10:59:36 +03:00

41 lines
1.0 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: |
aws --endpoint-url=http://${{ secrets.AWS_HOST }} s3 cp ./install_agent.sh s3://release
- name: Create version file
run: |
TAG="${{ github.ref }}"
echo "$TAG"
TAG="${TAG#refs/tags/}"
echo "$TAG"
TAG="${TAG#v}"
echo "$TAG"
echo "$TAG" > versionagent.txt
aws --endpoint-url=http://${{ secrets.AWS_HOST }} s3 cp ./versionagent.txt s3://doc