Bump github.com/docker/distribution #302
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: "Yorc GH Actions Build" | |
on: [push, pull_request] | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
security: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Run Snyk to check for vulnerabilities | |
uses: snyk/actions/golang@master | |
continue-on-error: true # To make sure that SARIF upload gets called | |
env: | |
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | |
with: | |
args: --sarif-file-output=snyk.sarif | |
- name: Upload result to GitHub Code Scanning | |
uses: github/codeql-action/upload-sarif@v1 | |
with: | |
sarif_file: snyk.sarif | |
- name: Run Snyk to check for vulnerabilities and send it to Snyk.io | |
uses: snyk/actions/golang@master | |
env: | |
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | |
with: | |
command: monitor | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
# Disabling shallow clone is recommended for improving relevancy of reporting (for sonar) | |
fetch-depth: 0 | |
- name: Setup go | |
uses: actions/setup-go@v1 | |
with: | |
go-version: "1" | |
- name: Test | |
run: | | |
go version | |
go env | |
echo "YORC_VERSION=$(grep "yorc_version" versions.yaml | awk '{print $2}')" >> $GITHUB_ENV | |
make tools | |
TESTARGS='-coverprofile coverage-sonar.out -coverpkg=./...' make json-test | |
- name: SonarCloud Scan | |
uses: sonarsource/sonarcloud-github-action@master | |
# Do this only on push commit do not need to be re-analyzed on PR | |
if: github.event_name == 'push' | |
with: | |
args: > | |
-Dsonar.projectVersion=${{ env.YORC_VERSION }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup jfrog CLI | |
uses: jfrog/setup-jfrog-cli@v1 | |
env: | |
JF_ARTIFACTORY_1: ${{ secrets.JF_ARTIFACTORY_SERVER_1 }} | |
- name: Ping Artifactory with jfrog CLI | |
run: | | |
# Ping the server | |
jfrog rt ping | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install sphinx dependencies | |
run: | | |
pip install --user --upgrade "sphinx<2" "semantic-version" "requests" "urllib3[secure]==1.23" "Pygments>=2.7.1" "jinja2<3.1.0" | |
pip install -r doc/requirements.txt | |
sudo apt-get install -y jq \ | |
latexmk \ | |
texlive-binaries \ | |
texlive-fonts-recommended \ | |
texlive-latex-base \ | |
texlive-latex-extra \ | |
texlive-latex-recommended | |
- name: Setup go | |
uses: actions/setup-go@v1 | |
with: | |
go-version: "1" | |
- name: Make distribution | |
run: | | |
set -euo pipefail | |
make tools | |
SKIP_TESTS=1 make dist | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Make Docker container | |
run: | | |
./docker_build.sh | |
- name: Deploy artifacts to Artifactory | |
run: | | |
./build/deploy_artifactory.sh |