revert docker image change #188
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
tags: | |
- '*' | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: | |
- linux/amd64 | |
#- linux/arm64 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
# Build and push with docker buildx | |
- name: Setup docker buildx | |
uses: docker/setup-buildx-action@v2 | |
with: | |
config: .github/buildkitd.toml | |
- name: Configure tags based on git tags + latest | |
uses: docker/metadata-action@v4 | |
id: meta | |
with: | |
images: ghcr.io/${{ github.repository }} | |
tags: | | |
type=pep440,pattern={{version}} | |
type=raw,value=latest,enable={{is_default_branch}} | |
type=ref,event=pr | |
- name: Docker login | |
uses: docker/login-action@v2 | |
#if: github.event_name != 'pull_request' | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Docker build and push with cache | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}:buildcache | |
cache-to: type=registry,ref=ghcr.io/${{ github.repository }}:buildcache | |
#push: ${{ github.ref == 'refs/heads/main' }} | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
platforms: ${{ matrix.platform }} | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: nightly | |
components: rustfmt,clippy | |
- run: cargo +nightly fmt -- --check | |
- uses: giraffate/clippy-action@v1 | |
with: | |
reporter: 'github-pr-review' | |
github_token: ${{ secrets.GITHUB_TOKEN }} |