chore: print the link to auth0 for device verification so the user ca… #86
This file contains 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
name: Build | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
name: Build Project | |
runs-on: ubuntu-latest | |
env: | |
BASE_PROJECT: armory-cli | |
PR_NUMBER: ${{ github.event.number }} | |
GOOS: linux | |
GOARCH: amd64 | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.ARMORY_PLATFORM_GITHUB_PAT_TOKEN }} | |
submodules: recursive | |
- name: Set variables | |
id: vars | |
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
- name: Setup Go environment | |
uses: actions/[email protected] | |
with: | |
go-version-file: 'go.mod' | |
- name: Cache Dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ~/go/pkg/mod | |
key: go-${{ hashFiles('**/go.sum') }} | |
restore-keys: go- | |
- name: Get GitHub App Installation Token for Private Go Repos | |
id: get_token | |
uses: machine-learning-apps/[email protected] | |
with: | |
APP_PEM: ${{ secrets.GO_PRIVATE_REPO_APP_KEY }} | |
APP_ID: ${{ secrets.GO_PRIVATE_REPO_APP_ID }} | |
- name: Configure git for private modules | |
env: | |
TOKEN: ${{ steps.get_token.outputs.app_token }} | |
run: git config --global url."https://x-access-token:${TOKEN}@github.com".insteadOf "https://github.com" | |
- name: Run build | |
run: | | |
make all | |
- name: Upload Tests Reports | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v2 | |
with: | |
name: armory-cli-reports | |
path: | | |
build/reports/* | |
- name: SonarQube Analysis | |
uses: sonarsource/sonarqube-scan-action@master | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} | |
- name: Login to Artifactory | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.ARTIFACTORY_USER }} | |
password: ${{ secrets.ARTIFACTORY_TOKEN }} | |
registry: armory-docker-local.jfrog.io | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USER }} | |
password: ${{ secrets.DOCKER_HUB_PASS }} | |
- name: Build and push | |
env: | |
REGISTRY: docker.io | |
IMAGE_TAG: dev | |
VERSION: sha-${{ steps.vars.outputs.sha_short }} | |
PUSH: true | |
run: make release |