Skip to content

Bump req from 0.5.18 to 0.6.1 #522

Bump req from 0.5.18 to 0.6.1

Bump req from 0.5.18 to 0.6.1 #522

Workflow file for this run

name: CI
on: [push, pull_request]
permissions:
contents: read
jobs:
test:
name: Test
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- name: Install OTP and Elixir
uses: erlef/setup-beam@fc68ffb90438ef2936bbb3251622353b3dcb2f93 # v1.24.0
with:
otp-version: 27.3.4.12
elixir-version: 1.18.1
- name: Install dependencies
run: |
mix deps.get
mix deps.compile
- name: Check mix format
run: mix format --check-formatted
- name: Start Typesense
run: docker compose up -d typesense
- name: Run tests
run: |
mix test.all
docker:
name: Docker
runs-on: ubuntu-24.04-arm
permissions:
contents: "read"
id-token: "write"
env:
IMAGE_NAME: "hexdocs"
PROJECT_ID: "hexpm-prod"
SERVICE_ACCOUNT: ${{ secrets.GCLOUD_SERVICE_ACCOUNT }}
WORKLOAD_IDENTITY_PROVIDER: ${{ secrets.GCLOUD_WORKFLOW_IDENTITY_POOL_PROVIDER }}
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- name: Set short git commit SHA
run: echo "COMMIT_SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
- name: Google auth
id: auth
uses: "google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093" # v3.0.0
if: ${{ github.event_name != 'pull_request' && env.SERVICE_ACCOUNT != '' }}
with:
token_format: "access_token"
project_id: ${{ env.PROJECT_ID }}
service_account: ${{ env.SERVICE_ACCOUNT }}
workload_identity_provider: ${{ env.WORKLOAD_IDENTITY_PROVIDER }}
- name: Docker Auth
id: docker-auth
uses: "docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee" # v4.2.0
if: ${{ github.event_name != 'pull_request' && env.SERVICE_ACCOUNT != '' }}
with:
registry: gcr.io
username: "oauth2accesstoken"
password: "${{ steps.auth.outputs.access_token }}"
- name: Build and push
id: build
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0
with:
platforms: linux/arm64
tags: gcr.io/${{ env.PROJECT_ID }}/${{ env.IMAGE_NAME }}:${{ env.COMMIT_SHORT_SHA }}
push: ${{ github.event_name != 'pull_request' && env.SERVICE_ACCOUNT != '' }}
cache-from: type=gha
cache-to: type=gha,mode=max