From d12888b56367056c23ae14082428bd53ba3dfcb0 Mon Sep 17 00:00:00 2001 From: "Alex Ellis (OpenFaaS Ltd)" Date: Fri, 15 Sep 2023 15:08:36 +0100 Subject: [PATCH] Update version of Docker actions Signed-off-by: Alex Ellis (OpenFaaS Ltd) --- .github/workflows/build.yaml | 15 ++++++--------- .github/workflows/publish.yaml | 13 ++++++------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 78ce2722..508caad2 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -19,18 +19,15 @@ jobs: uses: actions/checkout@master with: fetch-depth: 1 - - - name: Set Username/Repo as ENV vars - run: echo "USER_REPO"=$(echo "$GITHUB_REPOSITORY" | awk '{print tolower($1)}' | sed -e "s/:refs//") >> $GITHUB_ENV - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Local docker build (non-root image) - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: . file: ./Dockerfile @@ -40,12 +37,12 @@ jobs: build-args: | VERSION=latest-dev GIT_COMMIT=${{ github.sha }} - REPO_URL=https://github.com/${{ env.USER_REPO }} + REPO_URL=https://github.com/openfaas/faas-cli load: true tags: openfaas/faas-cli:${{ github.sha }} - name: Test for multi-arch build - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: . file: ./Dockerfile @@ -56,7 +53,7 @@ jobs: build-args: | VERSION=latest-dev GIT_COMMIT=${{ github.sha }} - REPO_URL=https://github.com/${{ env.USER_REPO }} + REPO_URL=https://github.com/openfaas/faas-cli tags: openfaas/faas-cli:${{ github.sha }} - name: Copy binary to host diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 9ee545bb..1dbd3f7a 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -31,16 +31,15 @@ jobs: - name: Set Username/Repo and ImagePrefix as ENV vars run: | - echo "USER_REPO"=$(echo "$GITHUB_REPOSITORY" | awk '{print tolower($1)}' | sed -e "s/:refs//") >> $GITHUB_ENV && \ echo "IMAGE_PREFIX"=$(echo "ghcr.io/$GITHUB_REPOSITORY" | awk '{print tolower($1)}' | sed -e "s/:refs//") >> $GITHUB_ENV - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to Container Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} @@ -56,7 +55,7 @@ jobs: build-args: | VERSION=${{ env.TAG }} GIT_COMMIT=${{ github.sha }} - REPO_URL=https://github.com/${{ env.USER_REPO }} + REPO_URL=https://github.com/openfaas/faas-cli push: true tags: | ${{ env.IMAGE_PREFIX }}:${{ github.sha }} @@ -73,7 +72,7 @@ jobs: build-args: | VERSION=${{ env.TAG }} GIT_COMMIT=${{ github.sha }} - REPO_URL=https://github.com/${{ env.USER_REPO }} + REPO_URL=https://github.com/openfaas/faas-cli push: true tags: | ${{ env.IMAGE_PREFIX }}:${{ github.sha }}-root @@ -81,7 +80,7 @@ jobs: ${{ env.IMAGE_PREFIX }}:latest-root - name: Build binaries for multiple environments - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v5 with: context: . file: ./Dockerfile.redist