ip-masq-agent-v2/.github/workflows/build-publish-mcr.yml

61 строка
1.4 KiB
YAML

name: Building and pushing mcr
on:
push:
tags:
- "v*"
permissions:
id-token: write
contents: read
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Lint
uses: golangci/golangci-lint-action@v2
with:
version: latest
args:
-v
--max-same-issues 10
--disable-all
--exclude-use-default=false
-E asciicheck
-E deadcode
-E errcheck
-E forcetypeassert
-E gocritic
-E gofmt
-E goimports
-E gosimple
-E govet
-E ineffassign
-E misspell
-E staticcheck
-E structcheck
-E typecheck
-E unused
-E varcheck
build:
runs-on:
labels: [self-hosted, "1ES.Pool=1es-aks-ip-masq-agent-pool-ubuntu"]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build
run: |
make build
- name: Publish
run: |
echo "Logging in with Azure CLI"
az login --identity
echo "Logging into ACR"
az acr login -n ${{ secrets.AZURE_REGISTRY_SERVER }}
echo "Pushing to ACR"
REGISTRY=${{ secrets.AZURE_REGISTRY_SERVER }}/public/aks VERSION="${{ github.ref_name }}" make all-manifest