Unverified Commit 323d070e by Enkelmann Committed by GitHub

Publish Docker images on ghcr.io (#222)

parent b06cccff
name: Publish Docker images for release versions
on:
release:
types: [published]
jobs:
build-and-publish-image:
runs-on: ubuntu-latest
steps:
- name: Get tag name
uses: olegtarasov/get-tag@v2.1
id: tagName
- name: Checkout repository
uses: actions/checkout@v2
- name: Log in to ghcr.io Container registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ghcr.io/fkie-cad/cwe_checker:${{ steps.tagName.outputs.tag }}
\ No newline at end of file
name: Publish Docker image based on master branch
on:
push:
branches: ['master']
jobs:
build-and-publish-image:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Log in to ghcr.io Container registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ghcr.io/fkie-cad/cwe_checker:latest
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment