From 21844dd1c3f484d8951f9b5a9d0442c6259fcfab Mon Sep 17 00:00:00 2001 From: Gianmarco Fraccaroli Date: Tue, 6 Aug 2024 09:42:28 +0200 Subject: [PATCH] ci refactor --- .github/workflows/build-docs.yml | 33 ++++++++------------------------ 1 file changed, 8 insertions(+), 25 deletions(-) diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 60e76133..0c222bfd 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -2,10 +2,6 @@ name: Build docker images on: workflow_dispatch: - inputs: - tag: - description: 'The docker image tag' - required: true push: branches: - master @@ -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: @@ -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 }}" @@ -76,7 +60,6 @@ jobs: strategy: fail-fast: false matrix: - lychee_version: [lycheeverse/lychee@v0.13.0] make: - name: docs path: docs