Update go.yml #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will build a golang project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | |
name: Go | |
on: | |
push: | |
tags: | |
- '**' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.19.1' | |
- name: Build | |
run: bash build.sh | |
- uses: shallwefootball/s3-upload-action@master | |
name: Upload S3 current_version_agent | |
with: | |
aws_key_id: ${{ secrets.AWS_KEY_ID }} | |
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY}} | |
aws_bucket: ${{ secrets.AWS_BUCKET }} | |
source_dir: 'current_version_agent' | |
destination_dir: 'v2' | |
- uses: shallwefootball/s3-upload-action@master | |
name: Upload S3 install.sh | |
with: | |
aws_key_id: ${{ secrets.AWS_KEY_ID }} | |
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY}} | |
aws_bucket: ${{ secrets.AWS_BUCKET }} | |
source_dir: 'install.sh' | |
destination_dir: 'v2' | |
- uses: shallwefootball/s3-upload-action@master | |
name: Upload S3 mysqlconfigurer.sh | |
with: | |
aws_key_id: ${{ secrets.AWS_KEY_ID }} | |
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY}} | |
aws_bucket: ${{ secrets.AWS_BUCKET }} | |
source_dir: 'mysqlconfigurer.sh' | |
destination_dir: 'v2' | |
- uses: shallwefootball/s3-upload-action@master | |
name: Upload S3 releem-agent-x86_64 | |
with: | |
aws_key_id: ${{ secrets.AWS_KEY_ID }} | |
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY}} | |
aws_bucket: ${{ secrets.AWS_BUCKET }} | |
source_dir: 'releem-agent-x86_64' | |
destination_dir: 'v2' | |
- uses: shallwefootball/s3-upload-action@master | |
name: Upload S3 releem-agent-amd64 | |
with: | |
aws_key_id: ${{ secrets.AWS_KEY_ID }} | |
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY}} | |
aws_bucket: ${{ secrets.AWS_BUCKET }} | |
source_dir: 'releem-agent-amd64' | |
destination_dir: 'v2' | |
- uses: shallwefootball/s3-upload-action@master | |
name: Upload S3 releem-agent-aarch64 | |
with: | |
aws_key_id: ${{ secrets.AWS_KEY_ID }} | |
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY}} | |
aws_bucket: ${{ secrets.AWS_BUCKET }} | |
source_dir: 'releem-agent-aarch64' | |
destination_dir: 'v2' | |
- uses: shallwefootball/s3-upload-action@master | |
name: Upload S3 releem-agent-freebsd-amd64 | |
with: | |
aws_key_id: ${{ secrets.AWS_KEY_ID }} | |
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY}} | |
aws_bucket: ${{ secrets.AWS_BUCKET }} | |
source_dir: 'releem-agent-freebsd-amd64' | |
destination_dir: 'v2' | |
- name: Log in to Docker Hub | |
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 | |
with: | |
images: releem/releem-agent | |
- name: Build and push Docker images | |
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 | |
with: | |
context: . | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |