Skip to content

Merge pull request #176 from squarescale/fix-lb-commands #327

Merge pull request #176 from squarescale/fix-lb-commands

Merge pull request #176 from squarescale/fix-lb-commands #327

Workflow file for this run

name: Go
on:
push:
branches:
- master
- production
- gh-actions
- '**-gh-actions'
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Get dependencies
run: |
go get -v -t -d ./...
- name: Test
run: go test ./...
- name: Build
run: make build docker-alpine-amd64
- name: Build gh-actions
run: make build-gh-actions
- uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'eu-west-1'
SOURCE_DIR: 'dist'
AWS_S3_BUCKET: 'cli-releases'
- name: Build binary for Docker
run: make docker-alpine-amd64
- name: Extract Github branch
id: get_branch
run: echo ::set-output name=GIT_BRANCH::${GITHUB_REF##*/}
- name: Build and push Docker images
uses: docker/build-push-action@v1.1.0
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}
repository: squarescale/cli
tags: ${{ steps.get_branch.outputs.GIT_BRANCH }}
tag_with_ref: true
tag_with_sha: true