mirror of
https://github.com/project-zot/zot.git
synced 2024-12-16 21:56:37 -05:00
903460c55c
Looks like read|write is not a correct value: https://github.com/project-zot/zot/actions/runs/2743961177 https://github.com/project-zot/zot/actions/runs/2743965531 Write should include both, so let's try to use that. Signed-off-by: Andrei Aaron <andaaron@cisco.com>
32 lines
830 B
YAML
32 lines
830 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: write
|
|
|
|
jobs:
|
|
sync-golang:
|
|
name: 'sync'
|
|
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 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 }}
|