From faa5b6ea97036a46ca8ae2fa0168d6d2ece76361 Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Fri, 5 Jul 2024 07:39:25 -0500 Subject: [PATCH] Remove container workflow for now --- .github/workflows/container.yml | 93 --------------------------------- 1 file changed, 93 deletions(-) delete mode 100644 .github/workflows/container.yml diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml deleted file mode 100644 index db090fb79..000000000 --- a/.github/workflows/container.yml +++ /dev/null @@ -1,93 +0,0 @@ -name: Build blog in container - -on: -# push: -# branches: [ "main" ] -# pull_request: -# branches: [ "main" ] - workflow_dispatch: - -env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} - - -jobs: - build: - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - id-token: write - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Install cosign - if: github.event_name != 'pull_request' - uses: sigstore/cosign-installer@v3.5.0 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3.3.0 - - - name: Log into registry ${{ env.REGISTRY }} - if: github.event_name != 'pull_request' - uses: docker/login-action@v3.2.0 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Extract Docker metadata - id: meta - uses: docker/metadata-action@v5.5.1 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - - - name: Setup Hugo - run: | - LATEST_HUGO_VERSION=$(grep github.com/gohugoio/hugo go.mod | awk '{print $NF}' | sed 's/^v//') - HUGO_DOWNLOAD_URL="https://github.com/gohugoio/hugo/releases/download/v${LATEST_HUGO_VERSION}/hugo_extended_${LATEST_HUGO_VERSION}_linux-amd64.tar.gz" - curl -sL --retry 5 "$HUGO_DOWNLOAD_URL" | tar xvzf - hugo - ./hugo version - - - name: Build with Hugo - env: - HUGO_ENVIRONMENT: production - HUGO_ENV: production - run: ./hugo --gc --minify --baseURL https://major.io/ - - - name: Fix RSS feed - run: | - mkdir -vp public/feed - cp public/index.xml public/feed/index.xml - cp public/index.xml public/feed/index.html - - - name: Build and push Docker image - id: build-and-push - uses: docker/build-push-action@v6.3.0 - with: - context: . - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=gha - cache-to: type=gha,mode=max - - - name: Sign the published Docker image - if: ${{ github.event_name != 'pull_request' }} - env: - TAGS: ${{ steps.meta.outputs.tags }} - DIGEST: ${{ steps.build-and-push.outputs.digest }} - run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST} - - - name: Update the blog container - if: github.event_name != 'pull_request' - run: | - curl -s -H "Authorization: Bearer ${WATCHTOWER_TOKEN}" \ - https://watchtower.thetanerd.com/v1/update - env: - WATCHTOWER_TOKEN: ${{ secrets.WATCHTOWER_TOKEN }}