update kobotoolbox to db #622
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: Build and publish Docker image to ghcr | |
on: push | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Log in to the container registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
# For convenience, tag builds with the branch name and/or tag name where applicable. | |
# For reproducibility, also tag builds with a unique build id. | |
tags: | | |
type=ref,priority=3,event=tag | |
type=ref,priority=2,event=branch | |
type=raw,priority=1,value=build-${{github.run_id}}-attempt-${{github.run_attempt}} | |
- name: Build and push the image | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
platforms: linux/amd64 | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
push: true |