-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: push to github container registry
- Loading branch information
Showing
4 changed files
with
40 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Deploy to GitHub Container Registry | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
workflow_dispatch: {} | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy to GitHub Container Registry | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v1 | ||
with: | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.CR_PAT }} | ||
registry: ghcr.io | ||
repository: ${{ github.repository }} | ||
tag_with_ref: true | ||
add_git_labels: true | ||
always_pull: true | ||
push: ${{ startsWith(github.ref, 'refs/tags/') }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
FROM alpine | ||
|
||
LABEL \ | ||
"name"="GitHub Repo Sync" \ | ||
"homepage"="https://github.com/marketplace/actions/github-sync" \ | ||
"repository"="https://github.com/repo-sync/github-sync" \ | ||
"maintainer"="Wei He <[email protected]>" | ||
org.opencontainers.image.title="GitHub Repo Sync" \ | ||
org.opencontainers.image.description="⤵️ A GitHub Action for syncing current repository with remote" \ | ||
org.opencontainers.image.url="https://github.com/repo-sync/github-sync" \ | ||
org.opencontainers.image.documentation="https://github.com/marketplace/actions/github-sync" \ | ||
org.opencontainers.image.source="https://github.com/repo-sync/github-sync" \ | ||
org.opencontainers.image.licenses="MIT" \ | ||
org.opencontainers.image.authors="Wei He <[email protected]>" \ | ||
maintainer="Wei He <[email protected]>" | ||
|
||
RUN apk add --no-cache git openssh-client && \ | ||
echo "StrictHostKeyChecking no" >> /etc/ssh/ssh_config | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ author: Wei He <[email protected]> | |
description: ⤵️ Sync current repository with remote | ||
branding: | ||
icon: 'git-branch' | ||
color: 'black' | ||
color: 'gray-dark' | ||
inputs: | ||
source_repo: | ||
description: GitHub public repo slug or full https clone url (with access_token if needed) | ||
|