build(deps): add flask as explicit dep for rockcraft pack (#5801) #176
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: Pack and Deploy | |
| on: | |
| push: | |
| branches: | |
| - main | |
| release: | |
| types: | |
| - published | |
| concurrency: | |
| group: "deploy-${{ github.ref }}" | |
| cancel-in-progress: true | |
| jobs: | |
| setup: | |
| runs-on: ubuntu-latest | |
| # Set the environment based on the trigger: 'release' for Production, 'push' for Staging. | |
| environment: ${{ github.event_name == 'release' && 'Production' || 'Staging' }} | |
| outputs: | |
| charm_name: ${{ steps.setup-vars.outputs.charm_name }} | |
| channel: ${{ steps.setup-vars.outputs.channel }} | |
| juju_controller_name: ${{ steps.setup-vars.outputs.juju_controller_name }} | |
| juju_model_name: ${{ steps.setup-vars.outputs.juju_model_name }} | |
| environment: ${{ steps.setup-vars.outputs.environment }} | |
| steps: | |
| - name: setup vars | |
| id: setup-vars | |
| run: | | |
| echo "charm_name=${{ vars.CHARM_NAME }}" >> $GITHUB_OUTPUT | |
| echo "channel=${{ vars.CHANNEL }}" >> $GITHUB_OUTPUT | |
| echo "juju_controller_name=${{ vars.JUJU_CONTROLLER_NAME }}" >> $GITHUB_OUTPUT | |
| echo "juju_model_name=${{ vars.JUJU_MODEL_NAME }}" >> $GITHUB_OUTPUT | |
| # Set the environment variable based on the trigger. | |
| echo "environment=${{ github.event_name == 'release' && 'Production' || 'Staging' }}" >> $GITHUB_OUTPUT | |
| deploy: | |
| needs: setup | |
| name: Deploy | |
| # https://github.com/canonical/webteam-devops | |
| uses: canonical/webteam-devops/.github/workflows/deploy.yaml@main | |
| with: | |
| environment: ${{ needs.setup.outputs.environment }} | |
| charm_name: ${{ needs.setup.outputs.charm_name }} | |
| channel: ${{ needs.setup.outputs.channel }} | |
| juju_controller_name: ${{ needs.setup.outputs.juju_controller_name }} | |
| juju_model_name: ${{ needs.setup.outputs.juju_model_name }} | |
| secrets: | |
| VAULT_APPROLE_ROLE_ID: ${{ secrets.VAULT_APPROLE_ROLE_ID }} | |
| VAULT_APPROLE_SECRET_ID: ${{ secrets.VAULT_APPROLE_SECRET_ID }} | |
| # See https://canonical-charmcraft.readthedocs-hosted.com/en/stable/reference/commands/login/ to create a Charmhub token | |
| # Default TTL is 30 hours, the command below creates one that is valid for 6 months | |
| # Current token was set 11 July 2025, needs update by 10 January 2026 | |
| # Use `charmcraft login --ttl 15638400 --export path/to/save-token-file` to create the token file. | |
| # Then, copy its contents to the secret. | |
| CHARMHUB_TOKEN: ${{ secrets.CHARMHUB_TOKEN }} |