Skip to content

Commit

Permalink
Refactor release workflow files for worker service
Browse files Browse the repository at this point in the history
- 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.
horta committed Oct 24, 2024
1 parent 26f8bf0 commit 1948959
Showing 2 changed files with 32 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -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 }}
26 changes: 26 additions & 0 deletions .github/workflows/release-worker.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 1948959

Please sign in to comment.