-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fe985bb
commit ed00859
Showing
1 changed file
with
19 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,22 +17,22 @@ jobs: | |
create_and_clone_repo: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Create empty repo | ||
uses: actions/github-script@v7 | ||
with: | ||
github-token: ${{ env.GITHUB_TOKEN }} | ||
script: | | ||
const repoName = '${{ env.REPO_NAME }}'; | ||
const response = await github.request('POST /orgs/{org}/repos', { | ||
org: 'kartverket', | ||
name: '${{ env.REPO_NAME }}', | ||
description: 'This is your first repository', | ||
visibility: 'internal', | ||
headers: { | ||
'X-GitHub-Api-Version': '2022-11-28' | ||
} | ||
}); | ||
console.log(`Response for creating repo ${repoName}:`, response); | ||
# - name: Create empty repo | ||
# uses: actions/github-script@v7 | ||
# with: | ||
# github-token: ${{ env.GITHUB_TOKEN }} | ||
# script: | | ||
# const repoName = '${{ env.REPO_NAME }}'; | ||
# const response = await github.request('POST /orgs/{org}/repos', { | ||
# org: 'kartverket', | ||
# name: '${{ env.REPO_NAME }}', | ||
# description: 'This is your first repository', | ||
# visibility: 'internal', | ||
# headers: { | ||
# 'X-GitHub-Api-Version': '2022-11-28' | ||
# } | ||
# }); | ||
# console.log(`Response for creating repo ${repoName}:`, response); | ||
- name: Checkout the reference repository | ||
uses: actions/checkout@v4 | ||
with: | ||
|
@@ -45,10 +45,9 @@ jobs: | |
git init | ||
git config --global user.name "DASK CI" | ||
git config --global user.email "[email protected]" | ||
git add . | ||
git commit -m "Initial commit from reference repository" | ||
git branch -M main | ||
git remote rename origin old-origin | ||
git remote add origin https://github.com/kartverket/${{ env.REPO_NAME }}.git | ||
git push -u origin main | ||
git push -u origin --all | ||
git push -u origin --tags | ||