From 4515a2bba43297a595bcfeb10e04b7ca70cc9128 Mon Sep 17 00:00:00 2001 From: Andy Cheung Date: Wed, 7 Apr 2021 14:53:30 -0400 Subject: [PATCH] Only upload if the action is running for master. Renames make.sh to upload.sh --- .github/workflows/build.yml | 5 +++-- make.sh => upload.sh | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) rename make.sh => upload.sh (97%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ad80fbe..cb176eb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,9 +24,10 @@ jobs: uses: actions/checkout@v2 - name: build run: ./scripts/build.sh - - name: Run make script + - name: upload + if: ${{ github.ref }} == "/refs/heads/master" run: | aws ecr get-login-password --region us-west-2 | docker login --username AWS --password-stdin 803688608479.dkr.ecr.us-west-2.amazonaws.com - ./make.sh + ./upload.sh env: PROD_ID: ${{ secrets.SIGSCI_PROD_CANONICAL_ID }} diff --git a/make.sh b/upload.sh similarity index 97% rename from make.sh rename to upload.sh index 2a82892..bc4307f 100755 --- a/make.sh +++ b/upload.sh @@ -1,8 +1,6 @@ #!/bin/sh set -ex -# ./scripts/build.sh - if [ -n "${PROD_ID}" ]; then ## setup our package properties by distro PKG_NAME="sigsci-module-golang"