Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Update version

Update version #84

Workflow file for this run

name: Main image
on:
push:
branches:
- main
paths-ignore:
- "README.md"
- "docker/Dockerfile.base"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
REGISTRY_ALIAS: g0j7o9w1
REPOSITORY: shrinkray/server
jobs:
coverage:
runs-on: ubuntu-latest
container:
image: public.ecr.aws/tpyo/shrinkray/base:latest
steps:
- name: Check out repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: docker-ce
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: llvm-tools-preview
- uses: actions/cache@v5
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate code coverage
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
env:
SHRINKRAY_LIB_PATH: /opt/shrinkray/lib
- name: Codecov
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
verbose: true
fail_ci_if_error: true
build:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/cache@v5
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v5
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Authenticate with registry
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
with:
registry-type: public
- name: Add metadata to Docker image
id: meta
uses: docker/metadata-action@v5
with:
images: public.ecr.aws/${{ env.REGISTRY_ALIAS }}/${{ env.REPOSITORY }}
tags: |
type=ref,event=branch
type=raw,value=latest,enable={{is_default_branch}}
type=sha
- name: Set up Docker buildx
uses: docker/setup-buildx-action@v3
- name: Build docker image
uses: docker/build-push-action@v6
with:
push: true
context: .
file: ./docker/Dockerfile
tags: |
${{ steps.meta.outputs.tags }}
public.ecr.aws/${{ env.REGISTRY_ALIAS }}/${{ env.REPOSITORY }}:latest
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
provenance: false