Consolidate deployment jobs into one
- 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:
parent
be92e748e1
commit
470fa896b4
@ -67,7 +67,7 @@ jobs:
|
||||
uv run python -m build
|
||||
uv run python -m twine upload dist/*
|
||||
|
||||
deploy_to_dockerhub:
|
||||
deploy_to_registries:
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
if: github.ref == 'refs/heads/master'
|
||||
@ -77,30 +77,15 @@ jobs:
|
||||
- name: Log in to DockerHub
|
||||
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
|
||||
run: echo "${{ vars.REPOSITORY_TOKEN }}" | docker login git.rogs.me -u rogs --password-stdin
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Build and push to Gitea
|
||||
- name: Build and push to both DockerHub and Gitea
|
||||
run: |
|
||||
docker buildx build --push \
|
||||
--tag rogsme/subscleaner:latest \
|
||||
--tag git.rogs.me/rogs/subscleaner:latest \
|
||||
.
|
||||
|
Loading…
x
Reference in New Issue
Block a user