Skip to content

ci: use if statement in docker push #6

ci: use if statement in docker push

ci: use if statement in docker push #6

Workflow file for this run

# Workflow to run on the main branch
name: main QA and release
on:
push:
branches:
- main
jobs:
test:
uses: ./.github/workflows/test.yml
release:
needs: [test]
runs-on: ubuntu-latest
outputs:
new_tag_version: ${{ steps.tag_version.outputs.new_tag_version }}
steps:
- name: Checkout πŸ›Ž
uses: actions/checkout@master
- name: Setup node env πŸ—
uses: actions/setup-node@v4
with:
node-version: 18
check-latest: true
- name: Install dependencies πŸ‘¨πŸ»β€
run: yarn install
- name: Dry run to get the next release version
id: tag_version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
export NEXT_TAG_VERSION=$(npx semantic-release --dry-run | grep 'The next release version is' | sed -E 's/.* ([[:digit:].]+)$/\1/')
echo "new_tag_version=${NEXT_TAG_VERSION}" >> $GITHUB_OUTPUT
- name: Release πŸš€
run: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Version
run: echo "The version is ${{ steps.tag_version.outputs.new_tag_version }}"
publish:
needs: [test, release]
uses: ./.github/workflows/docker-build.yml
secrets: inherit
with:
version: ${{ needs.release.outputs.new_tag_version }}
push: true