Consolidate deployment jobs into one
Some checks failed
CI + Deploy / lint (push) Successful in 9s
CI + Deploy / test (push) Successful in 11s
CI + Deploy / deploy_to_pypi (push) Failing after 12s
CI + Deploy / deploy_to_registries (push) Failing after 6s

- Combines DockerHub and Gitea deployment into a single job.
- Removes the separate `deploy_to_dockerhub` and `deploy_to_gitea` jobs.
- Simplifies the deployment process.
- Adds DockerHub tagging to the combined deployment job.
This commit is contained in:
Roger Gonzalez 2025-05-17 14:47:05 -03:00
parent be92e748e1
commit 470fa896b4
Signed by: rogs
GPG Key ID: C7ECE9C6C36EC2E6

View File

@ -67,7 +67,7 @@ jobs:
uv run python -m build uv run python -m build
uv run python -m twine upload dist/* uv run python -m twine upload dist/*
deploy_to_dockerhub: deploy_to_registries:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: test needs: test
if: github.ref == 'refs/heads/master' if: github.ref == 'refs/heads/master'
@ -77,30 +77,15 @@ jobs:
- name: Log in to DockerHub - name: Log in to DockerHub
run: echo "${{ secrets.DOCKERHUB_PASSWORD }}" | docker login -u "${{ secrets.DOCKERHUB_USERNAME }}" --password-stdin run: echo "${{ secrets.DOCKERHUB_PASSWORD }}" | docker login -u "${{ secrets.DOCKERHUB_USERNAME }}" --password-stdin
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push to DockerHub
run: |
docker buildx build --push \
--tag rogsme/subscleaner:latest \
.
deploy_to_gitea:
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v3
- name: Log in to Gitea Registry - name: Log in to Gitea Registry
run: echo "${{ vars.REPOSITORY_TOKEN }}" | docker login git.rogs.me -u rogs --password-stdin run: echo "${{ vars.REPOSITORY_TOKEN }}" | docker login git.rogs.me -u rogs --password-stdin
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v2
- name: Build and push to Gitea - name: Build and push to both DockerHub and Gitea
run: | run: |
docker buildx build --push \ docker buildx build --push \
--tag rogsme/subscleaner:latest \
--tag git.rogs.me/rogs/subscleaner:latest \ --tag git.rogs.me/rogs/subscleaner:latest \
. .