Skip to content

Commit

Permalink
Create ghcr.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 authored Dec 28, 2022
1 parent 82d77ed commit ad2b05c
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/ghcr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Push to GHCR

on:
push:
tags:
- '*'

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]

- name: Get branch names
id: branch-name
uses: tj-actions/branch-names@v6
with:
strip_tag_prefix: 'v'

- name: Set up QEMU
uses: docker/[email protected]

- name: Set up Docker Buildx
uses: docker/[email protected]

- name: Login to GitHub Container Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/[email protected]
with:
context: .
push: true
tags: |
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:${{ steps.branch-name.outputs.tag }}

0 comments on commit ad2b05c

Please sign in to comment.