|
|
@ -33,14 +33,23 @@ jobs:
|
|
|
|
- name: Build image
|
|
|
|
- name: Build image
|
|
|
|
run: docker build . --file Dockerfile --tag $IMAGE_NAME:${{ github.ref == 'refs/heads/next' && 'next' || github.ref_name }}
|
|
|
|
run: docker build . --file Dockerfile --tag $IMAGE_NAME:${{ github.ref == 'refs/heads/next' && 'next' || github.ref_name }}
|
|
|
|
if: github.ref == 'refs/heads/next' || startsWith(github.ref, 'refs/tags/v')
|
|
|
|
if: github.ref == 'refs/heads/next' || startsWith(github.ref, 'refs/tags/v')
|
|
|
|
|
|
|
|
- name: Set Tags
|
|
|
|
|
|
|
|
id: set_tags
|
|
|
|
|
|
|
|
run: |
|
|
|
|
|
|
|
|
TAGS=""
|
|
|
|
|
|
|
|
if [ "${{ github.ref }}" == "refs/heads/next" ]; then
|
|
|
|
|
|
|
|
TAGS="next"
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ "${{ github.ref }}" == refs/tags/v* ]]; then
|
|
|
|
|
|
|
|
TAGS="${TAGS:+$TAGS,}${GITHUB_REF#refs/tags/}"
|
|
|
|
|
|
|
|
TAGS="${TAGS:+$TAGS,}latest"
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "::set-output name=tags::$TAGS"
|
|
|
|
- name: Push to Docker Hub
|
|
|
|
- name: Push to Docker Hub
|
|
|
|
uses: docker/build-push-action@v1
|
|
|
|
uses: docker/build-push-action@v1
|
|
|
|
with:
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
repository: skytable/skytable
|
|
|
|
repository: skytable/skytable
|
|
|
|
tags: |
|
|
|
|
tags: ${{ steps.set_tags.outputs.tags }}
|
|
|
|
${{ github.ref == 'refs/heads/next' && 'next' || '' }}
|
|
|
|
|
|
|
|
${{ startsWith(github.ref, 'refs/tags/v') && github.ref_name || '' }}
|
|
|
|
|
|
|
|
${{ startsWith(github.ref, 'refs/tags/v') && 'latest' || '' }}
|
|
|
|
|
|
|
|
if: github.ref == 'refs/heads/next' || startsWith(github.ref, 'refs/tags/v')
|
|
|
|
if: github.ref == 'refs/heads/next' || startsWith(github.ref, 'refs/tags/v')
|
|
|
|