Skip to content

Commit

Permalink
Rework version commands
Browse files Browse the repository at this point in the history
  • Loading branch information
jthomperoo committed Jan 16, 2022
1 parent ff89de4 commit b66f2bc
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,21 @@ jobs:
uses: actions/checkout@v1
- name: Build
run: |
VERSION=$(git rev-parse --short ${{ github.sha }})
if [ ${{ github.event_name }} == "release" ]; then
VERSION="${{ github.ref_name }}"
else
VERSION=$(git rev-parse --short ${{ github.sha }})
fi
make
make VERSION=${VERSION}
- name: Deploy
env:
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_PASS: ${{ secrets.DOCKER_PASS }}
if: github.event_name != 'pull_request' && github.repository == 'jamjarlabs/jamjar-build-image'
run: |
VERSION=$(git rev-parse --short ${{ github.sha }})
if [ ${{ github.event_name }} == "release" ]; then
VERSION="${{ github.ref_name }}"
else
VERSION=$(git rev-parse --short ${{ github.sha }})
fi
echo "$DOCKER_PASS" | docker login --username=$DOCKER_USER --password-stdin
Expand Down

0 comments on commit b66f2bc

Please sign in to comment.