Updating go vendor #108
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: Scan & Publish Containers | |
on: | |
push: | |
branches: | |
- '*' | |
tags-ignore: | |
- '*.*.*' # Will not run when docker-release runs | |
jobs: | |
main: | |
env: | |
BASE_PROJECT: arm-cli | |
GRGIT_USER: GitHub | |
GRGIT_PASS: ${{ secrets.GITHUB_TOKEN }} | |
JFROG_ARGS: --url https://armory.jfrog.io/armory/ --user ${{secrets.ARTIFACTORY_USER}} --password ${{secrets.ARTIFACTORY_PASSWORD}} | |
GRADLE_ARGS: -Partifactory_user=${{secrets.ARTIFACTORY_USER}} -Partifactory_password=${{secrets.ARTIFACTORY_PASSWORD}} --info -x dockerClean -x dockerPrepare | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
- name: Fetch full history | |
run: git fetch --prune --tags --unshallow | |
- name: Download private dependencies | |
run: | | |
git config --global url."https://${GITHUB_TOKEN}:[email protected]/".insteadOf "https://github.com/" | |
GOPRIVATE=github.com/armory-io/dinghy go get github.com/armory-io/dinghy/pkg/parsers/yaml@master | |
go mod vendor | |
env: | |
GITHUB_TOKEN: ${{ secrets.ARMORYIO_GITHUB_TOKEN }} | |
- name: Set up JDK 1.11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.11 | |
- name: setup JFROG Cli | |
uses: jfrog/setup-jfrog-cli@v1 | |
with: | |
version: 1.32.4 | |
- name: Login to Artifactory | |
run: | | |
docker login -u ${{ secrets.ARTIFACTORY_USER }} -p ${{ secrets.ARTIFACTORY_PASSWORD }} armory-docker-local.jfrog.io | |
- name: create softlink for docker plugin | |
run: | | |
rm -fr build/docker | |
mkdir -p build | |
ln -sf $(pwd) $(pwd)/build/docker | |
- name: Publish devSnapshot | |
if: github.ref != 'refs/heads/master' | |
run: | | |
./gradlew devSnapshot docker dockerPush $GRADLE_ARGS | |
echo "BUILD_NUMBER=$(./gradlew $GRADLE_ARGS printVersion|grep VERSION|awk -F: '{print $2}')" >> $GITHUB_ENV | |
- name: Publish Candidate | |
if: github.ref == 'refs/heads/master' | |
run: | | |
./gradlew candidate docker dockerPush $GRADLE_ARGS | |
echo "BUILD_NUMBER=$(./gradlew -Prelease.useLastTag=true $GRADLE_ARGS printVersion|grep VERSION|awk -F: '{print $2}')" >> $GITHUB_ENV | |
- name: Run Security Scan | |
uses: armory-io/[email protected] | |
with: | |
username: ${{ secrets.AQUA_USER }} | |
password: ${{ secrets.AQUA_PASSWORD }} | |
url: https://aquasec.armory.io | |
image: armory/${{ env.BASE_PROJECT }}:${{ env.BUILD_NUMBER }} | |
registry: Artifactory |