Skip to content

Solve bug about vulnerabilities #29

Solve bug about vulnerabilities

Solve bug about vulnerabilities #29

name: build-docker-container
on:
push:
tags: ["v*"] # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Initialize variables
env:
GITHUB_REF: ${{ github.ref }}
run: |
cat <<EOF >> $GITHUB_ENV
PACKAGE_VERSION=$(echo $GITHUB_REF | tr -d 'refs/tags/' )
EOF
- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker images
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: |
ghcr.io/montimage/mmt-operator:${{ env.PACKAGE_VERSION }}
ghcr.io/montimage/mmt-operator:latest