Update workflow

This commit is contained in:
linguist
2020-12-30 20:29:17 +01:00
parent e38614a100
commit bf579d514a
2 changed files with 39 additions and 29 deletions

View File

@@ -5,6 +5,9 @@ on:
branches: [ master ]
pull_request:
branches: [ master ]
paths-ignore:
- '**/*.md'
- '**/*.png'
jobs:
build:
@@ -30,3 +33,20 @@ jobs:
config-file: ./.github/config/codeql.yml
- name: Analyze code
uses: github/codeql-action/analyze@v1
publish:
name: Publish Docker image to GitHub Packages
runs-on: ubuntu-latest
needs: [ build, analyze ]
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Publish image to GitHub Packages
uses: docker/build-push-action@v1
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
repository: lowlighter/metrics/metrics
tag_with_ref: true