mirror of
https://github.com/openfaas/faas.git
synced 2025-06-09 08:46:48 +00:00
Fix CI for deprecated set_output
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
This commit is contained in:
parent
004bbddadb
commit
b31419c8de
42
.github/workflows/build.yml
vendored
42
.github/workflows/build.yml
vendored
@ -23,12 +23,17 @@ jobs:
|
|||||||
uses: docker/setup-qemu-action@v1
|
uses: docker/setup-qemu-action@v1
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v1
|
||||||
- name: Get TAG
|
|
||||||
id: get_tag
|
- name: Get git commit
|
||||||
run: echo ::set-output name=TAG::latest-dev
|
id: get_git_commit
|
||||||
|
run: echo "GIT_COMMIT=$(git rev-parse HEAD)" >> $GITHUB_ENV
|
||||||
|
- name: Get version
|
||||||
|
id: get_version
|
||||||
|
run: echo "VERSION=$(git describe --tags --dirty)" >> $GITHUB_ENV
|
||||||
- name: Get Repo Owner
|
- name: Get Repo Owner
|
||||||
id: get_repo_owner
|
id: get_repo_owner
|
||||||
run: echo ::set-output name=repo_owner::$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')
|
run: echo "REPO_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')" > $GITHUB_ENV
|
||||||
|
|
||||||
- name: Build ${{ matrix.svc }}
|
- name: Build ${{ matrix.svc }}
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
@ -37,18 +42,18 @@ jobs:
|
|||||||
outputs: "type=image,push=false"
|
outputs: "type=image,push=false"
|
||||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||||
build-args: |
|
build-args: |
|
||||||
VERSION=${{ steps.get_tag.outputs.TAG }}
|
VERSION=${{ env.TAG }}
|
||||||
GIT_COMMIT=${{ github.sha }}
|
GIT_COMMIT=${{ github.sha }}
|
||||||
tags: |
|
tags: |
|
||||||
ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/gateway:${{ steps.get_tag.outputs.TAG }}
|
ghcr.io/${{ env.REPO_OWNER }}/gateway:${{ github.sha }}
|
||||||
ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/gateway:${{ github.sha }}
|
ghcr.io/${{ env.REPO_OWNER }}/gateway:${{ env.TAG }}
|
||||||
ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/gateway:latest
|
ghcr.io/${{ env.REPO_OWNER }}/gateway:latest
|
||||||
|
|
||||||
build-auth-plugins:
|
build-auth-plugins:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
go-version: [1.17.x]
|
go-version: [1.19.x]
|
||||||
svc: [
|
svc: [
|
||||||
basic-auth
|
basic-auth
|
||||||
]
|
]
|
||||||
@ -60,12 +65,17 @@ jobs:
|
|||||||
uses: docker/setup-qemu-action@v1
|
uses: docker/setup-qemu-action@v1
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v1
|
||||||
- name: Get TAG
|
|
||||||
id: get_tag
|
- name: Get git commit
|
||||||
run: echo ::set-output name=TAG::latest-dev
|
id: get_git_commit
|
||||||
|
run: echo "GIT_COMMIT=$(git rev-parse HEAD)" >> $GITHUB_ENV
|
||||||
|
- name: Get version
|
||||||
|
id: get_version
|
||||||
|
run: echo "VERSION=$(git describe --tags --dirty)" >> $GITHUB_ENV
|
||||||
- name: Get Repo Owner
|
- name: Get Repo Owner
|
||||||
id: get_repo_owner
|
id: get_repo_owner
|
||||||
run: echo ::set-output name=repo_owner::$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')
|
run: echo "REPO_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')" > $GITHUB_ENV
|
||||||
|
|
||||||
- name: Build ${{ matrix.svc }}
|
- name: Build ${{ matrix.svc }}
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
@ -74,6 +84,6 @@ jobs:
|
|||||||
outputs: "type=image,push=false"
|
outputs: "type=image,push=false"
|
||||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||||
tags: |
|
tags: |
|
||||||
ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/${{ matrix.svc }}:${{ steps.get_tag.outputs.TAG }}
|
ghcr.io/${{ env.REPO_OWNER }}/${{ matrix.svc }}:${{ github.sha }}
|
||||||
ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/${{ matrix.svc }}:${{ github.sha }}
|
ghcr.io/${{ env.REPO_OWNER }}/${{ matrix.svc }}:${{ env.TAG }}
|
||||||
ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/${{ matrix.svc }}:latest
|
ghcr.io/${{ env.REPO_OWNER }}/${{ matrix.svc }}:latest
|
||||||
|
51
.github/workflows/publish.yml
vendored
51
.github/workflows/publish.yml
vendored
@ -24,14 +24,23 @@ jobs:
|
|||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v1
|
||||||
with:
|
with:
|
||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
|
|
||||||
- name: Get TAG
|
- name: Get TAG
|
||||||
id: get_tag
|
id: get_tag
|
||||||
run: echo ::set-output name=TAG::${GITHUB_REF#refs/tags/}
|
run: echo TAG=${GITHUB_REF#refs/tags/} >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Get git commit
|
||||||
|
id: get_git_commit
|
||||||
|
run: echo "GIT_COMMIT=$(git rev-parse HEAD)" >> $GITHUB_ENV
|
||||||
|
- name: Get version
|
||||||
|
id: get_version
|
||||||
|
run: echo "VERSION=$(git describe --tags --dirty)" >> $GITHUB_ENV
|
||||||
- name: Get Repo Owner
|
- name: Get Repo Owner
|
||||||
id: get_repo_owner
|
id: get_repo_owner
|
||||||
run: echo ::set-output name=repo_owner::$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')
|
run: echo "REPO_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')" > $GITHUB_ENV
|
||||||
|
|
||||||
- name: Publish ${{ matrix.svc }}
|
- name: Publish ${{ matrix.svc }}
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
@ -40,17 +49,18 @@ jobs:
|
|||||||
outputs: "type=registry,push=true"
|
outputs: "type=registry,push=true"
|
||||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||||
build-args: |
|
build-args: |
|
||||||
VERSION=${{ steps.get_tag.outputs.TAG }}
|
VERSION=${{ env.TAG }}
|
||||||
GIT_COMMIT=${{ github.sha }}
|
GIT_COMMIT=${{ github.sha }}
|
||||||
tags: |
|
tags: |
|
||||||
ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/gateway:${{ steps.get_tag.outputs.TAG }}
|
ghcr.io/${{ env.REPO_OWNER }}/gateway:${{ github.sha }}
|
||||||
ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/gateway:${{ github.sha }}
|
ghcr.io/${{ env.REPO_OWNER }}/gateway:${{ env.TAG }}
|
||||||
ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/gateway:latest
|
ghcr.io/${{ env.REPO_OWNER }}/gateway:latest
|
||||||
|
|
||||||
publish-auth-plugins:
|
publish-auth-plugins:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
go-version: [1.17.x]
|
go-version: [1.19.x]
|
||||||
svc: [
|
svc: [
|
||||||
basic-auth
|
basic-auth
|
||||||
]
|
]
|
||||||
@ -62,18 +72,27 @@ jobs:
|
|||||||
uses: docker/setup-qemu-action@v1
|
uses: docker/setup-qemu-action@v1
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v1
|
||||||
- name: Get TAG
|
|
||||||
id: get_tag
|
|
||||||
run: echo ::set-output name=TAG::${GITHUB_REF#refs/tags/}
|
|
||||||
- name: Login to Docker Registry
|
- name: Login to Docker Registry
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v1
|
||||||
with:
|
with:
|
||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
|
|
||||||
|
- name: Get TAG
|
||||||
|
id: get_tag
|
||||||
|
run: echo TAG=${GITHUB_REF#refs/tags/} >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Get git commit
|
||||||
|
id: get_git_commit
|
||||||
|
run: echo "GIT_COMMIT=$(git rev-parse HEAD)" >> $GITHUB_ENV
|
||||||
|
- name: Get version
|
||||||
|
id: get_version
|
||||||
|
run: echo "VERSION=$(git describe --tags --dirty)" >> $GITHUB_ENV
|
||||||
- name: Get Repo Owner
|
- name: Get Repo Owner
|
||||||
id: get_repo_owner
|
id: get_repo_owner
|
||||||
run: echo ::set-output name=repo_owner::$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')
|
run: echo "REPO_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')" > $GITHUB_ENV
|
||||||
|
|
||||||
- name: Publish ${{ matrix.svc }}
|
- name: Publish ${{ matrix.svc }}
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
@ -82,6 +101,6 @@ jobs:
|
|||||||
outputs: "type=registry,push=true"
|
outputs: "type=registry,push=true"
|
||||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||||
tags: |
|
tags: |
|
||||||
ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/${{ matrix.svc }}:${{ steps.get_tag.outputs.TAG }}
|
ghcr.io/${{ env.REPO_OWNER }}/${{ matrix.svc }}:${{ github.sha }}
|
||||||
ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/${{ matrix.svc }}:${{ github.sha }}
|
ghcr.io/${{ env.REPO_OWNER }}/${{ matrix.svc }}:${{ env.TAG }}
|
||||||
ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/${{ matrix.svc }}:latest
|
ghcr.io/${{ env.REPO_OWNER }}/${{ matrix.svc }}:latest
|
||||||
|
Loading…
x
Reference in New Issue
Block a user