Skip to content

Commit

Permalink
Sync files with networkservicemesh/cmd-template
Browse files Browse the repository at this point in the history
This PR syncs files with https://github.com/networkservicemesh/cmd-template

Revision: https://github.com/networkservicemesh/cmd-template/commits/a56f245c851bc34228aa6e6c907e8ebd0032e065

commit a56f245c851bc34228aa6e6c907e8ebd0032e065
Author: Ed Warnicke <hagbard@gmail.com>
Date:   Tue Jun 1 15:23:50 2021 -0500

    Add support for pushing to ghcr repos (#72)

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
  • Loading branch information
NSMBot committed Jun 1, 2021
1 parent 3f68ee3 commit 7e45ee4
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/docker-push-ghcr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: docker-push-ghcr

on:
push:
branches: [main]

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v2

- 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.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker meta
id: metaci
uses: docker/metadata-action@v3
with:
images: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}/ci
tags: |
type=ref,event=pr
type=sha,prefix=
- name: "Build and push"
uses: docker/build-push-action@v2
with:
file: Dockerfile
context: .
push: true
tags: ${{ steps.metaci.outputs.tags }}

0 comments on commit 7e45ee4

Please sign in to comment.