Audit Snyk check/fix release_2 #3265
Workflow file for this run
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: | |
env: | |
IN_CI: '1' | |
SUMMON_PROVIDER: /usr/local/bin/gopass | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 15 | |
if: "!startsWith(github.event.head_commit.message, '[skip ci] ')" | |
steps: | |
- uses: docker-practice/actions-setup-docker@master | |
with: | |
docker_version: 19.03 | |
- run: sudo python3 -m pip install docker-compose==1.28.4 | |
- uses: actions/checkout@v1 | |
- uses: camptocamp/initialise-gopass-summon-action@v1 | |
with: | |
ci-gpg-private-key: ${{secrets.CI_GPG_PRIVATE_KEY}} | |
github-gopass-ci-token: ${{secrets.GOPASS_CI_GITHUB_TOKEN}} | |
- name: Pull | |
run: make pull | |
- name: Build | |
run: make build | |
env: | |
PRIVATE_SSH_KEY: ${{secrets.PRIVATE_SSH_KEY}} | |
- name: Acceptance | |
run: make acceptance | |
env: | |
PRIVATE_SSH_KEY: ${{secrets.PRIVATE_SSH_KEY}} | |
- run: docker-compose logs | |
if: failure() | |
- name: Release | |
run: | | |
if [[ ${{github.ref}} =~ ^refs/tags/([0-9]+(\.[0-9]+)*)$ ]] | |
then | |
tag="${BASH_REMATCH[1]}" | |
echo "Release tag ${tag}" | |
elif [[ ${{github.ref}} =~ ^refs/heads/release_([0-9]+)$ ]] | |
then | |
tag="${BASH_REMATCH[1]}" | |
echo "Release major ${tag}" | |
elif [[ ${{github.ref}} == refs/heads/master ]] | |
then | |
tag=latest | |
echo "Release latest" | |
else | |
echo "No release to do for ${{github.ref}}" | |
fi | |
if [[ -n "$tag" ]] | |
then | |
summon --yaml ' | |
USER: !var gs/ci/dockerhub/username | |
PASS: !var gs/ci/dockerhub/password | |
' bash -c 'docker login -u $USER -p $PASS' | |
if [[ "$tag" != "latest" ]] | |
then | |
docker tag camptocamp/shared_config_manager:latest camptocamp/shared_config_manager:${tag} | |
fi | |
docker push camptocamp/shared_config_manager:${tag} | |
rm -rf ~/.docker* # docker logout | |
fi |