[TO-157] Add test execution metadata table to artefact page (#354) #150
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
| on: | |
| push: | |
| branches: ["main"] | |
| tags: ["v*.*.*"] | |
| paths: | |
| - 'frontend/**' | |
| - '.github/workflows/publish_frontend.yml' | |
| env: | |
| REGISTRY: ghcr.io | |
| jobs: | |
| build-and-push-frontend-image: | |
| runs-on: [self-hosted, linux, jammy, x64] | |
| permissions: | |
| contents: read | |
| packages: write | |
| env: | |
| IMAGE_NAME: ${{ github.repository }}/frontend | |
| steps: | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| with: | |
| config-inline: | | |
| [registry."docker.io"] | |
| mirrors = ["https://github-runner-dockerhub-cache.canonical.com:5000"] | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Log in to the Container registry | |
| uses: docker/login-action@6d4b68b490aef8836e8fb5e50ee7b3bdfa5894f0 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract metadata (tags, labels) for Docker | |
| id: meta | |
| uses: docker/metadata-action@418e4b98bf2841bd337d0b24fe63cb36dc8afa55 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
| - name: Build and push frontend Docker image | |
| uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 | |
| with: | |
| context: ./frontend | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| build-and-push-frontend-charm: | |
| needs: build-and-push-frontend-image | |
| runs-on: [self-hosted, linux, xlarge, jammy, x64] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Upload charm to charmhub | |
| uses: canonical/charming-actions/[email protected] | |
| with: | |
| charm-path: "frontend/charm" | |
| credentials: "${{ secrets.CHARMHUB_TOKEN }}" | |
| github-token: "${{ secrets.GITHUB_TOKEN }}" | |
| tag-prefix: "frontend" |