From 3c4b8a7327e6c4a0feca6546e9bfbdcee13fde68 Mon Sep 17 00:00:00 2001 From: caipira113 Date: Thu, 21 Mar 2024 03:01:21 +0900 Subject: [PATCH] CI: update --- .github/workflows/build.yml | 4 ++-- .github/workflows/docker.yml | 13 ++++++------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a73f717..c32d59d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,7 +16,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Rust uses: actions-rs/toolchain@v1 with: @@ -29,7 +29,7 @@ jobs: - name: Build run: cargo ${{ matrix.config == 'release' && 'build --release' || 'build' }} - name: Archive artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ matrix.os }}-${{ matrix.config }}-artifacts path: target/${{ matrix.config }}/${{ github.event.repository.name }}${{ matrix.os == 'windows-latest' && '.exe' || '' }} \ No newline at end of file diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index c3462e8..c1164f7 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -15,18 +15,18 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Get commit sha run: echo "COMMIT_SHA=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV - name: Authenticate to Google Cloud id: auth - uses: google-github-actions/auth@v1 + uses: google-github-actions/auth@v2 with: token_format: access_token workload_identity_provider: ${{ secrets.IDENTITY_PROVIDER }} service_account: ${{ secrets.SERVICE_ACCOUNT }} - name: Login to Artifact Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ${{ secrets.ARTIFACT_REGISTRY }} username: oauth2accesstoken @@ -41,7 +41,7 @@ jobs: echo "${{ secrets.SSH_PRIVATE_KEY }}" | ssh-add - - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 env: SSH_AUTH_SOCK: /tmp/ssh_agent.sock with: @@ -52,14 +52,13 @@ jobs: platforms: linux/arm64 - name: Docker meta id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: ${{ secrets.ARTIFACT_REGISTRY }}/libnare/${{ github.event.repository.name }}/${{ github.ref_name }} - name: Build and Push env: - IMAGE_TAG: ${{ github.sha }} SSH_AUTH_SOCK: /tmp/ssh_agent.sock - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: .