Files
Transcriptarr/.github/workflows/github-actions-builddockerfile.yml
2024-03-04 07:49:49 -07:00

51 lines
1.3 KiB
YAML

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
with:
fetch-depth: 0
- name: Set Calver Version
uses: Nelyx/action-calver@v1.0.0
id: setcalver
with:
default_branch: 'refs/heads/main'
format: 'YY.M.D'
version_prefix: ''
- name: Update version file
run: |
sed -i 's/subgen_version =.*/subgen_version = ${{ steps.setcalver.outputs.package_version }}/' subgen/subgen.py
- name: Commit and push changes
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
git add subgen/subgen.py
git commit -m "Automated update subgen.py with version"
git push
-
name: Login to Docker Hub
uses: docker/login-action@v3.0.0
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