Skip to content

chore: upgrade stuff #7

chore: upgrade stuff

chore: upgrade stuff #7

Workflow file for this run

name: Build CI
on:
push:
branches: [ '*' ]
tags: [ 'v*.*.*' ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout git repository
uses: actions/checkout@v2
- name: Prepare docker image tags
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
with:
images: ghcr.io/${{ github.repository }}
tag-semver: |
{{version}}
{{major}}.{{minor}}
{{major}}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Github container registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Prepare BUILD.json
run: |
echo '{"version": "${{github.ref_name}}", "repository": "${{github.server_url}}/${{github.repository}}", "commit": "${{github.sha}}"}' > BUILD.json
cat BUILD.json
- name: Build and push docker images
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
allow: network.host
network: host
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}