Skip to content

WIP: add ETags

WIP: add ETags #758

Workflow file for this run

name: Test, lint and publish
on:
push:
branches:
- main
tags:
- "v*"
pull_request:
branches:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Style checks
uses: devcontainers/[email protected]
with:
runCmd: make style_checks
push: never
skipContainerUserIdUpdate: false
- name: Tests
uses: devcontainers/[email protected]
with:
runCmd: |
make style_checks
make tests
push: never
skipContainerUserIdUpdate: false
env: |
HYPOTHESIS_PROFILE=ci
- name: Coveralls
uses: coverallsapp/github-action@v2
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
COVERALLS_SERVICE_NAME: gihub-action
with:
path-to-lcov: coverage.lcov
continue-on-error: true
publish:
runs-on: ubuntu-latest
needs:
- test
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
# list of Docker images to use as base name for tags
images: |
renku/renku-data-service
# generate Docker tags based on the following events/attributes
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.RENKU_DOCKER_USERNAME }}
password: ${{ secrets.RENKU_DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
file: ./projects/renku_data_service/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=renku/renku-data-service:buildcache
cache-to: type=registry,ref=renku/renku-data-service:buildcache,mode=max