Auto_install_Zabbix_Agent/.gitea/workflows/publish.yml
stirelshka8 a4086feee0
Some checks failed
Upload to s3 / build_and_deploy (push) Failing after 1m57s
UPD CDCI 3
2024-07-20 10:55:04 +03:00

41 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: |
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