0
Fork 0
mirror of https://github.com/project-zot/zot.git synced 2024-12-16 21:56:37 -05:00
zot/.github/workflows/sync-golang-image.yaml
Ramkumar Chinchani 18d17f5d4c
also sync golang 1.19 (#826)
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-09-27 11:31:54 -07:00

34 lines
959 B
YAML

name: 'Sync golang image from docker to ghcr'
on:
schedule:
- cron: '30 1 * * *'
push:
branches:
- main
permissions:
contents: read
packages: write
jobs:
sync-golang:
name: 'sync'
strategy:
matrix:
golang_version:
- 1.18
- 1.19
runs-on: ubuntu-latest
steps:
- name: Log in to GitHub Docker Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Tag and push golang to ghcr
run: |
docker trust inspect golang:${{ matrix.golang_version }}
docker pull golang:${{ matrix.golang_version }}
docker tag golang:${{ matrix.golang_version }} ghcr.io/${{ github.repository_owner }}/golang:${{ matrix.golang_version }}
docker push ghcr.io/${{ github.repository_owner }}/golang:${{ matrix.golang_version }}