Build_Subgen_Dockerfile_GPU #170
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: Build_Subgen_Dockerfile | |
on: | |
push: | |
branches: | |
- 'main' | |
paths-ignore: | |
- '**.md' | |
- '**.yml' | |
workflow_dispatch: | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Increment and tag with CalVer | |
uses: mani-sh-reddy/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
YEAR_FORMAT: "YY" | |
- name: Update version file | |
run: | | |
sed -i 's/subgen_version =.*/subgen_version = ${{ steps.version.outputs.new_tag }}/' subgen/subgen.py | |
- name: Commit and push changes | |
run: | | |
git config --global user.name "GitHub Actions" | |
git config --global user.email "[email protected]" | |
git add subgen/subgen.py | |
git commit -m "Automated update subgen.py with version" | |
git push | |
- | |
name: Login to Docker Hub | |
uses: docker/[email protected] | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- | |
name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
push: true | |
tags: mccloud/subgen:latest |