Skip to content

Commit

Permalink
feat: specify default token
Browse files Browse the repository at this point in the history
  • Loading branch information
ForbesLindesay committed Aug 12, 2020
1 parent 2c00733 commit de7180e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
git-mirror:
runs-on: ubuntu-latest
steps:
- uses: mavenoid/git-mirror-action@2.1.1
- uses: mavenoid/git-mirror-action@2.2.0
with:
source-repo: '[email protected]:wearerequired/swisscom-magazine.git'
destination-repo: '[email protected]:wearerequired/git-mirror-action.git'
Expand All @@ -59,7 +59,7 @@ When prompted, provide a GitHub access token with `read:packages` scope.

Run the prebuilt image:

docker run --rm -e "SSH_PRIVATE_KEY=$(cat ~/.ssh/id_rsa)" "docker.pkg.github.com/mavenoid/git-mirror-action/git-mirror-action:2.1.1" "$SOURCE_REPO" "$DESTINATION_REPO"
docker run --rm -e "SSH_PRIVATE_KEY=$(cat ~/.ssh/id_rsa)" "docker.pkg.github.com/mavenoid/git-mirror-action/git-mirror-action:2.2.0" "$SOURCE_REPO" "$DESTINATION_REPO"

### Building and running locally

Expand All @@ -73,7 +73,7 @@ docker run --rm -e "SSH_PRIVATE_KEY=$(cat ~/.ssh/id_rsa)" $(docker build -q .) "

To release a new version of git-mirror-action:

1. Find and replace the current version number ("2.1.1") with the new version number
1. Find and replace the current version number ("2.2.0") with the new version number
2. Commit and push to GitHub
3. [Create and publish a new release](https://github.com/Mavenoid/git-mirror-action/releases/new) with the "Tag version" exactly matching the new version number.

Expand Down
6 changes: 3 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ inputs:
required: true
github-token:
description: 'GitHub token for pulling internal docker container (container is public so any token will do).'
required: true
default: ${{ github.token }}
runs:
using: "composite"
steps:
- name: Authenticate
run: echo ${{ inputs.github-token }} | docker login docker.pkg.github.com -u $GITHUB_ACTOR --password-stdin
shell: bash
- name: Pull Image
run: docker pull "docker.pkg.github.com/mavenoid/git-mirror-action/git-mirror-action:2.1.1"
run: docker pull "docker.pkg.github.com/mavenoid/git-mirror-action/git-mirror-action:2.2.0"
shell: bash
- name: Git Mirror
run: docker run --rm -e "SSH_PRIVATE_KEY=${{ inputs.ssh-private-key }}" "docker.pkg.github.com/mavenoid/git-mirror-action/git-mirror-action:2.1.1" "${{ inputs.source-repo }}" "${{ inputs.destination-repo }}"
run: docker run --rm -e "SSH_PRIVATE_KEY=${{ inputs.ssh-private-key }}" "docker.pkg.github.com/mavenoid/git-mirror-action/git-mirror-action:2.2.0" "${{ inputs.source-repo }}" "${{ inputs.destination-repo }}"
shell: bash

0 comments on commit de7180e

Please sign in to comment.