Skip to content

Commit

Permalink
ci refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Fraccaman committed Aug 6, 2024
1 parent 8cb130d commit 21844dd
Showing 1 changed file with 8 additions and 25 deletions.
33 changes: 8 additions & 25 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ name: Build docker images

on:
workflow_dispatch:
inputs:
tag:
description: 'The docker image tag'
required: true
push:
branches:
- master
Expand All @@ -18,6 +14,9 @@ jobs:
docker:
runs-on: [ubuntu-22.04]
needs: [checks]
env:
GIT_LFS_SKIP_SMUDGE: 1
REGISTRY_URL: ghcr.io
strategy:
fail-fast: false
matrix:
Expand All @@ -39,34 +38,19 @@ jobs:
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
version: v0.9.1
- name: Login to private registry
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ${{ secrets.REGISTRY_URL }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ secrets.REGISTRY_URL }}/namada-${{ matrix.make.image }}-docs
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=raw,value=latest
registry: ${{ env.REGISTRY_URL }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: ${{ matrix.make.name }}
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
push: ${{ github.ref == 'refs/heads/master' }}
tags: ${{ steps.meta.outputs.tags }}
tags: ${{ env.REGISTRY_URL }}/anoma/namada-docs:${{ matrix.docker.image }}-main
labels: ${{ steps.meta.outputs.labels }}
build-args: |
"TARGET=${{ matrix.make.path }}"
Expand All @@ -76,7 +60,6 @@ jobs:
strategy:
fail-fast: false
matrix:
lychee_version: [lycheeverse/[email protected]]
make:
- name: docs
path: docs
Expand Down

0 comments on commit 21844dd

Please sign in to comment.