31 lines
856 B
YAML
31 lines
856 B
YAML
name: Verify and Push
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
verify:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: "1.20"
|
|
- name: Checkout repo
|
|
uses: actions/checkout@v3
|
|
- name: Lint code
|
|
uses: golangci/golangci-lint-action@v3
|
|
- name: Run tests
|
|
run: make test
|
|
- name: Log in to Docker Hub
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: cloudlena
|
|
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
|
- name: Set up container image build
|
|
uses: docker/setup-buildx-action@v2
|
|
- name: Build and push container image
|
|
uses: docker/build-push-action@v4
|
|
with:
|
|
push: true
|
|
tags: cloudlena/s3manager:latest
|
|
platforms: linux/amd64,linux/arm64
|