Skip to content

Commit

Permalink
ci: no new versions, but keep building images
Browse files Browse the repository at this point in the history
  • Loading branch information
amitkparekh committed Dec 1, 2023
1 parent 17c1a14 commit 368b9a8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 45 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Build and push images

on:
workflow_call:
workflow_dispatch:
release:
types: [published]
Expand Down Expand Up @@ -28,16 +29,16 @@ jobs:
- name: Check out the repository
uses: actions/checkout@v4

- name: Install Poetry
run: pipx install poetry

- name: Define image suffix
id: image-tag
env:
TORCH_VERSION_SUFFIX: ${{ matrix.torch_version_suffix }}
run: |
IMAGE_TAG=$(poetry version -s | tr -d 'v')
IMAGE_TAG=$(echo "$IMAGE_TAG$TORCH_VERSION_SUFFIX" | tr + -)
if [ -z "$TORCH_VERSION_SUFFIX" ]; then
TORCH_VERSION_SUFFIX="cpu"
exit 0
fi
IMAGE_TAG=$(echo "$IMAGE_TAG$TORCH_VERSION_SUFFIX" | tr -d "+")
echo "tag=$IMAGE_TAG" >> "$GITHUB_OUTPUT"
- name: Log in to the Container registry
Expand Down
45 changes: 5 additions & 40 deletions .github/workflows/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ name: Releases

on:
push:
branches:
- main
branches: [main]

env:
PYTHON_VERSION: 3.9
Expand All @@ -29,42 +28,8 @@ jobs:
uses: "./.github/workflows/tests.yml"
secrets: inherit

release:
name: Release
runs-on: ubuntu-latest
build_image:
name: Build image
uses: "./.github/workflows/build-image.yml"
secrets: inherit
needs: [continuous-integration, tests]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.PAT }}

- name: Setup Git
env:
PAT: ${{ secrets.PAT }}
USERNAME: ${{ secrets.SIMBOT_BOT_USERNAME }}
EMAIL: ${{ secrets.SIMBOT_BOT_EMAIL }}
run: |
git config user.name "${USERNAME}"
git config user.email "${EMAIL}"
git config --global url."https://${PAT}@github.com/".insteadOf "https://github.com/"
- name: Install Poetry
run: pipx install poetry

- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "lts/*"

- name: Install semantic release
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
run: |
npm install --no-save @bjoluc/semantic-release-config-poetry
npx semantic-release

0 comments on commit 368b9a8

Please sign in to comment.