Update client.go #34
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
name: Build and Release | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: '1.21' | |
- name: Build | |
run: rm -rf ecsagent && go build -o ecsagent client.go | |
- name: Archive artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ecsagent | |
path: ecsagent # Path to the directory or file you want to archive | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Download artifact | |
uses: actions/download-artifact@v2 | |
with: | |
name: ecsagent | |
- name: Commit and push changes | |
run: | | |
git config --global user.name "daily-update" | |
git config --global user.email "[email protected]" | |
git add . | |
git commit -m "Add compiled artifact" | |
git push |