Skip to content

iexec-market-api: v7.1.0 #3

iexec-market-api: v7.1.0

iexec-market-api: v7.1.0 #3

name: API docker release
description: Publish the API when a release is published
on:
release:
types: [published]
jobs:
get-version:
# only run for releases with tag 'iexec-market-api-v*' as created by release-please for API
if: startsWith(github.ref_name,'iexec-market-api-v')
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
- name: Set publish version
id: set-publish-version
working-directory: api
run: |
VERSION=$(npm pkg get version | tr -d '"')
echo "VERSION=${VERSION}" | tee -a $GITHUB_OUTPUT
outputs:
version: ${{ steps.set-publish-version.outputs.VERSION }}
docker-publish:
if: startsWith(github.ref_name,'iexec-market-api-v')
needs: get-version
uses: ./.github/workflows/reusable-api-docker.yml
with:
tag: ${{ needs.get-version.outputs.version }}
secrets:
docker-username: ${{ secrets.DOCKERHUB_USERNAME }}
docker-password: ${{ secrets.DOCKERHUB_PAT }}