0
Fork 0
mirror of https://github.com/project-zot/zot.git synced 2025-01-06 22:40:28 -05:00
zot/.github/workflows/sync-golang-image.yaml
Andrei Aaron 7182e426a7 Fix typos in workflow permissions
Signed-off-by: Andrei Aaron <andaaron@cisco.com>
2022-07-26 10:40:51 -07:00

32 lines
835 B
YAML

name: 'Sync golang image from docker to ghcr'
on:
schedule:
- cron: '30 1 * * *'
push:
branches:
- main
env:
GOLANG_VERSION: 1.18
permissions:
contents: read
packages: read|write
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 }}