ci: seperate job runs #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |