Skip to content

Commit

Permalink
Correction of some to create the release on tag. Add the permission i…
Browse files Browse the repository at this point in the history
…n release action to can create the release in the repo. The Docker login was skipped on tag and we added a dedicated if in the code, to solve this issue.
  • Loading branch information
tosun-si committed Jun 10, 2024
1 parent 9fa9d57 commit e4d3461
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
branches: ['*']
push:
branches: [main]
tags: ['*']
tags: ['v*.*.*']
workflow_dispatch:

jobs:
Expand All @@ -27,7 +27,7 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
if: github.event_name == 'workflow_dispatch'
if: ${{ github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/') }}
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ name: Publish Package PyPi

on:
push:
tags: ["*"]
tags: ['v*.*.*']
workflow_dispatch:

env:
PYTHON_VERSION: 3.9.18
PYTHON_VERSION: 3.9.19

jobs:
publish:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@ name: Release

on:
push:
tags: ['*']
tags: ['v*.*.*']

jobs:
release:
name: Release
runs-on: ubuntu-latest

permissions:
contents: write

steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down

0 comments on commit e4d3461

Please sign in to comment.