Skip to content

ci: seperate job runs #2

ci: seperate job runs

ci: seperate job runs #2

name: CI
on:
pull_request:
workflow_dispatch:
workflow_call:
jobs:
push-container:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/node-pnpm-setup
- uses: ./.github/actions/setup-env
with:
env_vars: ${{ secrets.ENV_VARS }}
ga_id: ${{ secrets.GA_ID }}
- name: Version extraction
id: get_version
run: echo "::set-output name=version::$(node -p "require('./package.json').version")"
- name: Building & tagging
run: |
docker build -t ashgw/mysite:latest -f deployment/dockerfile . && docker build -t ashgw/mysite:${{ steps.get_version.outputs.version }} -f deployment/dockerfile .
- name: Login
run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ashgw --password-stdin
- name: Pushing to the hub both versions
run: docker push ashgw/mysite:latest && docker push ashgw/mysite:${{ steps.get_version.outputs.version }}