1.0.0-rc.6 #36
Workflow file for this run
This file contains hidden or 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: CICD | |
| on: | |
| push: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| if: github.ref == 'refs/heads/next' || github.ref == 'refs/heads/master' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.TOKEN }} | |
| - name: Python Semantic Release | |
| uses: python-semantic-release/python-semantic-release@master | |
| id: semantic-release | |
| with: | |
| github_token: ${{ secrets.TOKEN }} | |
| - name: Build | |
| run: | | |
| python3 -m pip install --upgrade build | |
| python3 -m build | |
| - name: Upload PYPI | |
| if: steps.semantic-release.outputs.released == 'true' | |
| run: | | |
| python3 -m pip install twine==6.0.1 | |
| python3 -m twine upload --repository pypi dist/* -u __token__ -p ${{ secrets.PYPI_TOKEN }} | |
| - name: Merge master -> next | |
| if: github.ref == 'refs/heads/master' | |
| uses: devmasx/merge-branch@master | |
| with: | |
| type: now | |
| from_branch: master | |
| target_branch: next | |
| github_token: ${{ secrets.TOKEN }} | |
| docker-build-squash-push: | |
| uses: Geode-solutions/actions/.github/workflows/docker-build-squash-push.yml@master | |
| if: github.ref == 'refs/heads/next' || github.ref == 'refs/heads/master' | |
| with: | |
| tag: ${{ github.ref_name }} | |
| secrets: | |
| TOKEN: ${{secrets.TOKEN}} | |
| LICENSE_TOKEN: ${{secrets.TOKEN}} | |
| amazon-ecr: | |
| runs-on: ubuntu-latest | |
| if: github.ref == 'refs/heads/next' || github.ref == 'refs/heads/master' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.TOKEN }} | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@v1 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| aws-region: ${{ secrets.AWS_REGION }} | |
| - name: Login to Amazon ECR | |
| run: | | |
| aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/m4f6w3w9 | |
| docker build -t pegghy-viewer . | |
| docker tag pegghy-viewer:latest public.ecr.aws/m4f6w3w9/pegghy-viewer:${{github.ref_name}} | |
| docker push public.ecr.aws/m4f6w3w9/pegghy-viewer:${{github.ref_name}} |