Skip to content

Trying to understand variable configuration #1

Description

@phillamb168

Hi, here's a snippet of my implementation of this action:
- name: repo-sync
uses: wei/git-sync@v1
env:
SOURCE_REPO: "[email protected]:hopeonesource/hopeonesource.org.git"
SOURCE_BRANCH: ${ GITHUB_REF:11 }
DESTINATION_REPO: "codeserver.dev.[redacted]@codeserver.dev.[redacted].drush.in:2222/~/repository.git"
DESTINATION_BRANCH: ${ GITHUB_REF:11 }
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY_PANTHEON_REMOTE }}
with:
args: $SOURCE_REPO $SOURCE_BRANCH $DESTINATION_REPO $DESTINATION_BRANCH

The secret exists, however I am getting both a Permission Denied (public key) message as well as the following:

SOURCE=[email protected]:repo/repo.git:${
DESTINATION=[email protected]:GITHUB_REF:11.git:}
Warning: Permanently added 'github.com,140.82.114.4' (RSA) to the list of known hosts.
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
error: src refspec ${ does not match any
error: failed to push some refs to '[email protected]:GITHUB_REF:11.git'
##[error]Docker run failed with exit code 1

What am I doing wrong? It's tough to find documentation on how env vars are supposed to be referenced.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions