diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4cf422e24..d0395e726 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -80,15 +80,10 @@ jobs: - name: Release if: "contains(github.event.head_commit.message, '[release]')" run: | - bash tag-and-push.sh + bash typespec/tag-and-push-docs.sh env: - GRADLE_OPTS: '-Dorg.gradle.daemon=false' - AWS_ACCESS_KEY_ID: ${{secrets.TOWER_CI_AWS_ACCESS}} - AWS_SECRET_ACCESS_KEY: ${{secrets.TOWER_CI_AWS_SECRET}} DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - DOCKER_PAT: ${{ secrets.DOCKER_PAT }} - QUAY_PAT: ${{ secrets.QUAY_PAT }} - GITHUB_TOKEN: ${{ secrets.GH_SEQERA_TOKEN }} + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - name: Publish tests report if: failure() diff --git a/.github/workflows/typespec.yml b/.github/workflows/typespec.yml index e8491b951..44c08535f 100644 --- a/.github/workflows/typespec.yml +++ b/.github/workflows/typespec.yml @@ -37,13 +37,3 @@ jobs: cd typespec tsp install tsp compile . - - - name: Release - if: "contains(github.event.head_commit.message, '[release-docs]')" - run: | - bash typespec/tag-and-push-docs.sh - env: - GRADLE_OPTS: '-Dorg.gradle.daemon=false' - AWS_ACCESS_KEY_ID: ${{secrets.TOWER_CI_AWS_ACCESS}} - AWS_SECRET_ACCESS_KEY: ${{secrets.TOWER_CI_AWS_SECRET}} - GITHUB_TOKEN: ${{ secrets.GH_SEQERA_TOKEN }} diff --git a/typespec/tag-and-push-docs.sh b/typespec/tag-and-push-docs.sh index 67ea6f897..38afb0c8b 100755 --- a/typespec/tag-and-push-docs.sh +++ b/typespec/tag-and-push-docs.sh @@ -21,20 +21,17 @@ set -e set -x -SED=sed -[[ $(uname) == Darwin ]] && SED=gsed -RELEASE=${RELEASE:-$(git show -s --format='%s' | $SED -rn 's/.*\[(release)\].*/\1/p')} -if [[ $RELEASE ]]; then - npm install -g @typespec/compiler +npm install -g @typespec/compiler - cd typespec +cd typespec +tsp install +tsp compile . - tsp install +TAG=$(cat ../VERSION) - tsp compile . +docker build -t docker.io/hrma017/wave/openapi:$TAG . +echo "Build docker.io/wave/openapi:$TAG" - docker build -t 195996028523.dkr.ecr.eu-west-1.amazonaws.com/wave/wave-docs:$VERSION . - - docker push 195996028523.dkr.ecr.eu-west-1.amazonaws.com/wave/wave-docs:$VERSION -fi +docker push docker.io/hrma017/wave/openapi:$TAG +echo "Pushed docker.io/hrma017/wave/openapi:$TAG"