From a488a1403e2172200aef12efe0bea7db2b5ab1c8 Mon Sep 17 00:00:00 2001 From: Arun Date: Fri, 29 Dec 2023 19:18:29 -0800 Subject: [PATCH 1/2] ci: Use GITHUB_OUTPUT envvar instead of set-output command --- .github/workflows/release.yaml | 62 +++++++++++++++++----------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index fbfa0a52..5439faeb 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -10,34 +10,34 @@ jobs: name: build_to_release runs-on: ubuntu-latest steps: - - name: Check out code into the Go module directory - uses: actions/checkout@v3 - - - name: Fetch tags - run: | - git fetch --prune --unshallow --tags - - - name: Login to Docker Hub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Branch name - id: branch_name - run: | - echo ::set-output name=SOURCE_NAME::${GITHUB_REF#refs/*/} - echo ::set-output name=SOURCE_BRANCH::${GITHUB_REF#refs/heads/} - echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/} - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v2 - - - name: Make plik release - run: make release-and-push-to-docker-hub - - - name: Upload artifacts to release - uses: softprops/action-gh-release@v1 - with: - files: releases/* + - name: Check out code into the Go module directory + uses: actions/checkout@v3 + + - name: Fetch tags + run: | + git fetch --prune --unshallow --tags + + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Branch name + id: branch_name + run: | + echo "SOURCE_NAME=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT + echo "SOURCE_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT + echo "SOURCE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v2 + + - name: Make plik release + run: make release-and-push-to-docker-hub + + - name: Upload artifacts to release + uses: softprops/action-gh-release@v1 + with: + files: releases/* From 6a7b15ead784ba958d23f8c38693829298b1951f Mon Sep 17 00:00:00 2001 From: Arun Date: Mon, 22 Jan 2024 16:44:13 -0800 Subject: [PATCH 2/2] Quote envvar to match documentation --- .github/workflows/release.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5439faeb..ebd49fbc 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -26,9 +26,9 @@ jobs: - name: Branch name id: branch_name run: | - echo "SOURCE_NAME=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT - echo "SOURCE_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT - echo "SOURCE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT + echo "SOURCE_NAME=${GITHUB_REF#refs/*/}" >> "$GITHUB_OUTPUT" + echo "SOURCE_BRANCH=${GITHUB_REF#refs/heads/}" >> "$GITHUB_OUTPUT" + echo "SOURCE_TAG=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT" - name: Set up Docker Buildx id: buildx