From 19489597249d99812dbcac1d1bf129e60964c57d Mon Sep 17 00:00:00 2001 From: Danilo Horta Date: Thu, 24 Oct 2024 22:40:52 +0100 Subject: [PATCH] Refactor release workflow files for worker service MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Renamed `release-control-container.yml` to `release-worker-container.yml` - Updated workflow tags and variables to `worker-v*` in the renamed file - Corrected Docker tags from `deciphonctl` to `deciphon-worker` - Created new workflow `release-worker.yml` for worker releases 🍰 The renaming and updates better align the workflow files with the purpose of releasing the worker containers and packages. This ensures consistency in our CI/CD practices and improves traceability and clarity in our automation process. --- ...ainer.yml => release-worker-container.yml} | 12 ++++----- .github/workflows/release-worker.yml | 26 +++++++++++++++++++ 2 files changed, 32 insertions(+), 6 deletions(-) rename .github/workflows/{release-control-container.yml => release-worker-container.yml} (73%) create mode 100644 .github/workflows/release-worker.yml diff --git a/.github/workflows/release-control-container.yml b/.github/workflows/release-worker-container.yml similarity index 73% rename from .github/workflows/release-control-container.yml rename to .github/workflows/release-worker-container.yml index e10d5e63..b7c8a8b4 100644 --- a/.github/workflows/release-control-container.yml +++ b/.github/workflows/release-worker-container.yml @@ -1,9 +1,9 @@ -name: 🐳 Control container release +name: 🐳 Worker container release on: push: tags: - - control-v* + - worker-v* jobs: docker: @@ -27,14 +27,14 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Set env - run: echo "VERSION=${GITHUB_REF#refs/*/control-v}" >> $GITHUB_ENV + run: echo "VERSION=${GITHUB_REF#refs/*/worker-v}" >> $GITHUB_ENV - name: Build and push uses: docker/build-push-action@v5 with: - context: control/ + context: worker/ platforms: linux/amd64,linux/arm64 push: true tags: | - danilohorta/deciphonctl:latest - danilohorta/deciphonctl:${{ env.VERSION }} + danilohorta/deciphon-worker:latest + danilohorta/deciphon-worker:${{ env.VERSION }} diff --git a/.github/workflows/release-worker.yml b/.github/workflows/release-worker.yml new file mode 100644 index 00000000..e5a3e606 --- /dev/null +++ b/.github/workflows/release-worker.yml @@ -0,0 +1,26 @@ +name: 📦 Worker release + +on: + push: + tags: + - worker-v* + +defaults: + run: + working-directory: worker + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Build + run: pipx run build + + - uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{secrets.PYPI_API_TOKEN}} + packages-dir: worker/dist + skip-existing: true