From 32fba3ee12d2e8a88c7008775e1d1277567bfd58 Mon Sep 17 00:00:00 2001 From: Tracey Jaquith Date: Sat, 6 Jan 2024 19:10:58 -0800 Subject: [PATCH] use versions. try to delete .git to save space --- .github/workflows/cicd.yml | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 30b6f27..742d3f2 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -1,5 +1,5 @@ -name: Hello Folks -on: [workflow_dispatch] +name: CICD +on: push jobs: greeting: runs-on: ubuntu-latest @@ -13,13 +13,13 @@ jobs: # Workaround: https://github.com/docker/build-push-action/issues/461 - name: Setup Docker buildx - uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 + uses: docker/setup-buildx-action@v3 # Login against a Docker registry except on PR # https://github.com/docker/login-action - name: Log into registry ghcr.io if: github.event_name != 'pull_request' - uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} @@ -29,15 +29,27 @@ jobs: # https://github.com/docker/metadata-action - name: Extract Docker metadata id: meta - uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0 + uses: docker/metadata-action@v5 with: images: ghcr.io/${{ github.repository }} + - name: Check working space directory1 + run: du ${GITHUB_WORKSPACE} -h -d 1 + + - name: Get more space + run: | + df . -h + sudo rm -rf ${GITHUB_WORKSPACE}/.git + df . -h + + - name: Check working space directory2 + run: du ${GITHUB_WORKSPACE} -h -d 1 + # Build and push Docker image with Buildx (don't push on PR) # https://github.com/docker/build-push-action - name: Build and push Docker image id: build-and-push - uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0 + uses: docker/build-push-action@v5 with: context: . push: ${{ github.event_name != 'pull_request' }}