Merge pull request #166 from YoungJinJung/disable-docker-build-releas… #2
Workflow file for this run
This file contains hidden or 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: Build and Deploy to S3 | |
| on: | |
| push: | |
| tags: | |
| - "*.*.*" | |
| env: | |
| AWS_DEFAULT_REGION: ap-northeast-2 | |
| permissions: | |
| packages: write | |
| contents: read | |
| id-token: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.21' | |
| - name: Cache Go dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cache/go-build | |
| ./vendor | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go- | |
| - name: Install dependencies using Go Modules | |
| run: | | |
| go mod tidy | |
| go mod vendor | |
| - name: Configure aws credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/gitaction | |
| aws-region: ${{ env.AWS_DEFAULT_REGION }} | |
| - name: Build Goployer binary and Upload to S3 | |
| run: make release-build |