Skip to content

Commit

Permalink
#7: Attempting to resolve git tag retrieving
Browse files Browse the repository at this point in the history
  • Loading branch information
blackandred committed Nov 15, 2020
1 parent 6ad2679 commit 2860a7e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/test-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Parse version
id: branch_name
run: |
echo ::set-output name=SOURCE_NAME::${GITHUB_REF#refs/*/}
echo ::set-output name=SOURCE_BRANCH::${GITHUB_REF#refs/heads/}
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
- name: "Login to quay"
uses: docker/login-action@v1
with:
Expand All @@ -55,10 +48,10 @@ jobs:
run: "pip install -r ./requirements.txt && pip install -r ./requirements-dev.txt"

- name: Release to docker registry (x86)
run: "RKD_COMPAT_SUBPROCESS=true rkd :release:docker:x86 --git-tag=${{ steps.branch_name.outputs.SOURCE_TAG }}"
run: "RKD_COMPAT_SUBPROCESS=true rkd :release:docker:x86 --git-tag=${GITHUB_REF}"

# - name: Release to docker registry (arm)
# run: "rkd :release:docker:x86 --git-tag=${{ steps.branch_name.outputs.SOURCE_TAG }}"
# run: "rkd :release:docker:x86 --git-tag=${GITHUB_REF}"

- name: Release to PyPI
run: "rkd :release:pypi --token=${{ secrets.PYPI_TOKEN }}"
7 changes: 6 additions & 1 deletion .rkd/makefile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,12 @@ tasks:
docker_tag = 'latest-dev-' + arch
repo = os.getenv('REPO')
if tag:
if "refs" in tag:
if "refs/tags" in tag:
docker_tag = tag[len('refs/tags/'):]
else:
docker_tag = 'latest-dev-' + arch
elif tag:
docker_tag = arch + '-' + tag
image_name = '{repo}:{tag}'.format(tag=docker_tag, repo=repo)
Expand Down

0 comments on commit 2860a7e

Please sign in to comment.