v0.0.3 #3
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: Release | |
on: | |
release: | |
types: [published] | |
jobs: | |
# Builds the image and publishes it on docker hub | |
build_and_push_docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v3 | |
- name: Build container | |
run: docker build --build-arg VERSION=${{ github.ref_name }} -t cubicrootxyz/trollinfo:latest . | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Push image (latest) | |
run: docker push cubicrootxyz/trollinfo:latest | |
- name: Tag image with version | |
run: docker tag cubicrootxyz/trollinfo:latest cubicrootxyz/trollinfo:${{ github.event.release.tag_name }} | |
- name: Push image (version) | |
run: docker push cubicrootxyz/trollinfo:${{ github.event.release.tag_name }} |