mirror of
https://github.com/project-zot/zot.git
synced 2025-03-11 02:17:43 -05:00
Periodically sync golang image from dockerhub to ghcr.io
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
This commit is contained in:
parent
a8a65a6c37
commit
a04f870a22
1 changed files with 28 additions and 0 deletions
28
.github/workflows/sync-golang-image.yaml
vendored
Normal file
28
.github/workflows/sync-golang-image.yaml
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
name: 'Sync golang image from docker to ghcr'
|
||||
on:
|
||||
schedule:
|
||||
- cron: '30 1 * * *'
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
env:
|
||||
GOLANG_VERSION: 1.18
|
||||
|
||||
jobs:
|
||||
sync-golang:
|
||||
name: 'sync'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Log in to GitHub Docker Registry
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Tag and push golang to ghcr
|
||||
run: |
|
||||
docker pull golang:${{ env.GOLANG_VERSION }}
|
||||
docker tag golang:${{ env.GOLANG_VERSION }} ghcr.io/${{ github.repository_owner }}/golang:${{ env.GOLANG_VERSION }}
|
||||
docker push ghcr.io/${{ github.repository_owner }}/golang:${{ env.GOLANG_VERSION }}
|
Loading…
Add table
Reference in a new issue