Skip to content

Update tools

Update tools #12

Workflow file for this run

name: DockerHub
on:
push:
branches:
- 'main'
jobs:
tag:
name: Build container, tag the release and push to Docker hub
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- name: Build the container
run : |
docker build -t ${{ github.sha }} .
- name: Work out the tag
id: custom_tag
run: |
echo "::set-output name=custom_tag::$(date +"%Y.%-m.%-d").$(git rev-list --count HEAD)"
- name: Bump version and push tag
id: tag
uses: viostream/github-tag-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CUSTOM_TAG: ${{ steps.custom_tag.outputs.custom_tag }}
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push to Docker Hub
run: |
docker tag ${{ github.sha }} viostream/tentacle:${{ steps.custom_tag.outputs.custom_tag }}
docker push viostream/tentacle:${{ steps.custom_tag.outputs.custom_tag }}
docker tag ${{ github.sha }} viostream/tentacle:latest
docker push viostream/tentacle:latest