Skip to content

Commit

Permalink
use env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
eaudetcobello committed May 7, 2024
1 parent 7d94bfb commit af9b48e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/scripts/sync-registry.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

actor=$1
token=$2
dir=$3
actor=${ACTOR}
token=${TOKEN}
dir=${DIR}

docker run -v "$dir":/tmp/ quay.io/skopeo/stable:v1.15 sync \
--src yaml \
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/sync-registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,9 @@ jobs:
uses: actions/checkout@v4

- name: Sync registry.k8s.io to ghcr.io/canonical
env:
ACTOR: ${{ github.actor }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
DIR: ${GITHUB_WORKSPACE}
run: |
./${GITHUB_WORKSPACE}/.github/scripts/sync-registry.sh ${{ github.actor }} ${{ secrets.GITHUB_TOKEN }} ${GITHUB_WORKSPACE}
./${GITHUB_WORKSPACE}/.github/scripts/sync-registry.sh

0 comments on commit af9b48e

Please sign in to comment.