Skip to content

Commit

Permalink
CI: update
Browse files Browse the repository at this point in the history
  • Loading branch information
caipira113 committed Mar 20, 2024
1 parent 7a0b797 commit 3c4b8a7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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' || '' }}
13 changes: 6 additions & 7 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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: .
Expand Down

0 comments on commit 3c4b8a7

Please sign in to comment.