Skip to content

feat: support dependencies vendoring #131

feat: support dependencies vendoring

feat: support dependencies vendoring #131

Workflow file for this run

name: publish
on:
push:
branches:
- 'master'
tags:
- 'v*'
pull_request:
branches:
- 'master'
env:
TEST_TAG: enapter/rockamalg:latest
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v3
with:
go-version: ~1.19
check-lates: false
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Test
run: go test -timeout 1m ./...
golangci-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ~1.19
check-latest: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.52.2
docker:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v3
with:
go-version: ~1.19
check-latest: false
id: go
- name: Checkout
uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: enapter/rockamalg
- name: Build and export to Docker
uses: docker/build-push-action@v2
with:
context: .
load: true
tags: ${{ env.TEST_TAG }}
- name: Integration Tests
run: go test -tags=integration -timeout 5m ./tests/integration
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push to DockerHub
if: ${{ github.event_name != 'pull_request' }}
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Login to Enapter DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
registry: docker.enapter.com
username: ${{ secrets.ENAPTER_DOCKERHUB_USERNAME }}
password: ${{ secrets.ENAPTER_DOCKERHUB_TOKEN }}
- name: Enapter Docker meta
if: github.event_name != 'pull_request'
id: enapter_meta
uses: docker/metadata-action@v3
with:
images: docker.enapter.com/lua/rockamalg
- name: Build and push to Enapter DockerHub
if: ${{ github.event_name != 'pull_request' }}
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ steps.enapter_meta.outputs.tags }}
labels: ${{ steps.enapter_meta.outputs.labels }}