Skip to content

Commit

Permalink
Merge pull request #6 from umarcor/ghcr
Browse files Browse the repository at this point in the history
Push container image to GHCR and use it in the Action
  • Loading branch information
tgorochowik authored Sep 2, 2021
2 parents a83dc39 + 125ccd0 commit ccdc2e3
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
33 changes: 33 additions & 0 deletions .github/workflows/Container.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Container

on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: '0 0 * * 3'

jobs:

container:
runs-on: ubuntu-latest
env:
IMAGE: ghcr.io/chipsalliance/verible-linter-action
steps:

- uses: actions/checkout@v2

- name: Build container image
run: docker build -t $IMAGE .

- name: Login to GitHub Container Registry (GHCR)
if: github.event_name != 'pull_request' && github.repository == 'chipsalliance/verible-linter-action'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: gha
password: ${{ github.token }}

- name: Push container image to GitHub Container Registry (GHCR)
if: github.event_name != 'pull_request' && github.repository == 'chipsalliance/verible-linter-action'
run: docker push $IMAGE
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ inputs:

runs:
using: 'docker'
image: 'Dockerfile'
image: 'docker://ghcr.io/chipsalliance/verible-linter-action'

0 comments on commit ccdc2e3

Please sign in to comment.