Skip to content

Merge pull request #107 from namada-net/update-version-1.4.6 #16

Merge pull request #107 from namada-net/update-version-1.4.6

Merge pull request #107 from namada-net/update-version-1.4.6 #16

Workflow file for this run

name: Deploy Stuff 🧙‍♂️
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-[a-z]+"
permissions:
packages: write
pages: write
id-token: write
contents: read
jobs:
docker:
name: Docker
runs-on: ubuntu-latest
env:
GIT_LFS_SKIP_SMUDGE: 1
REGISTRY_URL: ghcr.io
REPOSITORY: ${{ github.repository }}
strategy:
fail-fast: true
matrix:
docker:
[
{ image: chain, context: chain, cache_scope: "chain" },
{ image: webserver, context: webserver, cache_scope: "webserver" },
{ image: block-index-builder, context: block-index, cache_scope: "block-index" },
]
steps:
- name: Checkout repo
uses: actions/checkout@v4
- id: get_version
uses: battila7/get-version-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push
id: push
uses: docker/build-push-action@v5
with:
context: .
file: ${{ matrix.docker.context }}/Dockerfile
push: true
tags: ${{ env.REGISTRY_URL }}/${{ env.REPOSITORY }}:${{ matrix.docker.image }}-${{ steps.get_version.outputs.version-without-v }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha,scope=${{ matrix.docker.cache_scope }}
cache-to: type=gha,scope=${{ matrix.docker.cache_scope }},mode=max
swagger-ui:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Generate Swagger UI
uses: Legion2/swagger-ui-action@v1
with:
output: swagger-ui
spec-file: swagger.yml
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Pages
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/configure-pages@v5
- name: Upload artifact
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/upload-pages-artifact@v3
with:
path: 'swagger-ui'
- name: Deploy to GitHub Pages
if: startsWith(github.ref, 'refs/tags/v')
id: deployment
uses: actions/deploy-pages@v4