Compare commits
73 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
23478a09ad | ||
|
|
888cfb7f0c | ||
|
|
febd814501 | ||
|
|
91716319e5 | ||
|
|
95a34adfba | ||
|
|
0865ac62e2 | ||
|
|
fa26cc9ba1 | ||
|
|
06622d8529 | ||
|
|
6e884a3321 | ||
|
|
26f94b13a3 | ||
|
|
543d33a363 | ||
|
|
08c6b3a2e3 | ||
|
|
fe62eb455c | ||
|
|
139af4526d | ||
|
|
fdc6d95388 | ||
|
|
55e21143a9 | ||
|
|
4e2e9638b6 | ||
|
|
6a103e03a3 | ||
|
|
a2e2213ce4 | ||
|
|
4bc423721a | ||
|
|
5ef1917f61 | ||
|
|
3b98325435 | ||
|
|
7688e0cbc7 | ||
|
|
5595250e09 | ||
|
|
4e8f7f271f | ||
|
|
f2db146379 | ||
|
|
11e6e12f60 | ||
|
|
56827f467a | ||
|
|
34a05d36a6 | ||
|
|
bb1ee93cb9 | ||
|
|
de64657f2c | ||
|
|
32e0aac7fa | ||
|
|
d62945518b | ||
|
|
a73381dafa | ||
|
|
3c564909d0 | ||
|
|
e65ddbcdfd | ||
|
|
71f3728648 | ||
|
|
54b0888107 | ||
|
|
0a056599a3 | ||
|
|
18c361ce7f | ||
|
|
7240558fd8 | ||
|
|
d76304d5ea | ||
|
|
947625402d | ||
|
|
6285473aa7 | ||
|
|
0d7242e7fc | ||
|
|
28dd92bcec | ||
|
|
e0fff7d62e | ||
|
|
5171313fd6 | ||
|
|
9d6af11683 | ||
|
|
b99b892baf | ||
|
|
e3bf97c1ca | ||
|
|
5adc4e70a4 | ||
|
|
a01b7130b8 | ||
|
|
dbd20f76d5 | ||
|
|
df0a3488d5 | ||
|
|
5d1637699c | ||
|
|
767f48236c | ||
|
|
cd04389146 | ||
|
|
d48a659702 | ||
|
|
462132dc28 | ||
|
|
e6cfcc57fe | ||
|
|
9a7204dfca | ||
|
|
22751c3d2b | ||
|
|
a87c48b4ee | ||
|
|
64b17ac379 | ||
|
|
5c3f366371 | ||
|
|
c4b36f3e20 | ||
|
|
796c3370ca | ||
|
|
e9f7e6fd36 | ||
|
|
edcae1c219 | ||
|
|
bba2ce50bb | ||
|
|
e35659c99c | ||
|
|
598702c8b2 |
104
.github/workflows/publish-release.yml
vendored
Normal file
104
.github/workflows/publish-release.yml
vendored
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
name: Publish Release
|
||||||
|
on: workflow_dispatch
|
||||||
|
jobs:
|
||||||
|
job:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: startsWith(github.ref, 'refs/heads/release/')
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Validate the release
|
||||||
|
uses: actions/github-script@v4
|
||||||
|
with:
|
||||||
|
|
||||||
|
# token needed to see draft releases when getting all releases
|
||||||
|
github-token: ${{ secrets.MY_GITHUB_TOKEN_TESTREPO }}
|
||||||
|
script: |
|
||||||
|
const ver = "${{ github.ref }}".substring(19)
|
||||||
|
const tag = "v" + ver
|
||||||
|
var rel = null
|
||||||
|
try {
|
||||||
|
// this does *not* return draft releases, so we have to list them
|
||||||
|
//rel = await github.repos.getReleaseByTag({ ... })
|
||||||
|
const rels = await github.repos.listReleases({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo
|
||||||
|
})
|
||||||
|
for (const r of rels.data) {
|
||||||
|
if (r.tag_name === tag) {
|
||||||
|
rel = r
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
core.setFailed(`Could not find a release for tag ${tag}.`)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (rel === null) {
|
||||||
|
core.setFailed(`Could not find a release for tag ${tag}.`)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!rel.draft) {
|
||||||
|
core.setFailed(`Release for tag ${tag} is already published.`)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
const ref = await github.git.getRef({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
ref: 'tags/' + tag
|
||||||
|
})
|
||||||
|
core.setFailed(`Tag ${tag} already exists.`)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
// this is expected
|
||||||
|
}
|
||||||
|
// everything is OK
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Configure repository
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
git config user.email "github-actions@hazelcast.com"
|
||||||
|
git config user.name "GitHub Actions (Build Release)"
|
||||||
|
|
||||||
|
- name: Finalize the release
|
||||||
|
run: |
|
||||||
|
ref="${{ github.ref }}"
|
||||||
|
branch="${ref:11}" # trim starting 'refs/heads/' (11 chars)
|
||||||
|
version="${ref:19}" # trim starting 'refs/heads/release/' (19 chars)
|
||||||
|
echo "Tag branch $branch as v$version"
|
||||||
|
git tag v$version
|
||||||
|
git push --tags
|
||||||
|
#git push :$branch
|
||||||
|
|
||||||
|
- name: Publish the release
|
||||||
|
uses: actions/github-script@v4
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
const ver = "${{ github.ref }}".substring(19)
|
||||||
|
const tag = "v" + ver
|
||||||
|
var rel = null
|
||||||
|
// no, see above
|
||||||
|
//const rel = await github.repos.getReleaseByTag({ ... })
|
||||||
|
const rels = await github.repos.listReleases({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo
|
||||||
|
})
|
||||||
|
for (const r of rels.data) {
|
||||||
|
if (r.tag_name === tag) {
|
||||||
|
rel = r
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
await github.repos.updateRelease({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
release_id: rel.id,
|
||||||
|
draft: false
|
||||||
|
})
|
||||||
26
.github/workflows/rest-description.yml
vendored
Normal file
26
.github/workflows/rest-description.yml
vendored
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
name: Toy with issue description
|
||||||
|
on:
|
||||||
|
issues:
|
||||||
|
types: labeled
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
toy-desc:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: |
|
||||||
|
!contains(github.event.issue.title, '!exclude!') ||
|
||||||
|
contains(github.event.issue.title, '!force!')
|
||||||
|
steps:
|
||||||
|
- name: Toy with issue description
|
||||||
|
uses: actions/github-script@v4.0.2
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
const title = `${{ github.event.issue.title }} !`
|
||||||
|
const body = `updated\n${{ github.event.issue.body }}`
|
||||||
|
github.issues.update({
|
||||||
|
issue_number: context.issue.number,
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
title: title,
|
||||||
|
body: body
|
||||||
|
})
|
||||||
|
|
||||||
82
.github/workflows/symlink-test.yml
vendored
Normal file
82
.github/workflows/symlink-test.yml
vendored
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
name: Symlink Test
|
||||||
|
on:
|
||||||
|
# trigger on push to any branch
|
||||||
|
push:
|
||||||
|
branches-ignore:
|
||||||
|
- 'release/*'
|
||||||
|
tags-ignore:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
# try to create and push the symlink
|
||||||
|
symlink-test:
|
||||||
|
|
||||||
|
name: Symlink Test
|
||||||
|
runs-on: windows-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
|
||||||
|
# checkout the code
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
# symlink via bash
|
||||||
|
# this does *not* create a symlink, but a directory
|
||||||
|
#- name: Symlink Bash
|
||||||
|
# shell: bash
|
||||||
|
# run: |
|
||||||
|
# if ! [ -L bang ]; then
|
||||||
|
# ln -s duh bang
|
||||||
|
# ls -l
|
||||||
|
# git config --global user.email "stephan@REDACTED.com"
|
||||||
|
# git config --global user.name "Stephan"
|
||||||
|
# git config --global core.symlinks "true"
|
||||||
|
# git add bang
|
||||||
|
# git commit -m "created symlink"
|
||||||
|
# fi
|
||||||
|
|
||||||
|
# symlink via pwsh
|
||||||
|
# this creates a 'bang' file that contains 'duh'
|
||||||
|
# on local machine, it fails 'New-Item: Administrator privilege required for this operation.'
|
||||||
|
#
|
||||||
|
# update: it creates *something* that is listed as a directory in the log,
|
||||||
|
# and that GitHub represents as a link, so it has to be a link, but when
|
||||||
|
# I check the thing out, it's a file
|
||||||
|
# because Windows won't create the link but on Linux, it's checked out as a link
|
||||||
|
#
|
||||||
|
#- name: Symlink Pwsh
|
||||||
|
# shell: pwsh
|
||||||
|
# run: |
|
||||||
|
# if (! (test-path bang)) {
|
||||||
|
# New-Item -ItemType SymbolicLink -Name bang -Target duh
|
||||||
|
# write-output "DIR:"
|
||||||
|
# ls .
|
||||||
|
# write-output "DIR:"
|
||||||
|
# ls bang
|
||||||
|
# git config --global user.email "stephan@REDACTED.com"
|
||||||
|
# git config --global user.name "Stephan"
|
||||||
|
# git config --global core.symlinks "true"
|
||||||
|
# git add bang
|
||||||
|
# git commit -m "created symlink"
|
||||||
|
# }
|
||||||
|
|
||||||
|
# see
|
||||||
|
# this just creates the symlink in Git - works on Windows
|
||||||
|
# BUT will be checked out as a file and we don't care
|
||||||
|
- name: Symlink Git
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
if ! [ -f "bang" ]; then
|
||||||
|
git update-index --add --cacheinfo 120000 "$(echo "duh" | git hash-object -w --stdin)" "bang"
|
||||||
|
git config --global user.email "stephan@REDACTED.com"
|
||||||
|
git config --global user.name "Stephan"
|
||||||
|
git commit -m "created symlink"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# push changes back
|
||||||
|
- name: Push
|
||||||
|
shell: bash
|
||||||
|
run: git push
|
||||||
25
.github/workflows/test-push.yml
vendored
Normal file
25
.github/workflows/test-push.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
name: Test Push
|
||||||
|
on: push
|
||||||
|
jobs:
|
||||||
|
foo:
|
||||||
|
name: Foo
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
ref: ${{github.ref}}
|
||||||
|
|
||||||
|
- name: Foo
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "foo" >> foo.txt
|
||||||
|
|
||||||
|
- name: Push
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
git config --global user.name "GitHub Actions"
|
||||||
|
git config --global user.email "github-actions@hazelcast.com"
|
||||||
|
git add foo.txt
|
||||||
|
git commit -m "Foo"
|
||||||
|
git push
|
||||||
27
README.md
27
README.md
@@ -1,19 +1,30 @@
|
|||||||
# test-repo
|
# A Git(Hub) Test Repository
|
||||||
|
|
||||||
A Git(Hub) Test Repository
|
Hey! This is my personal Git(Hub) Test Repository where I experiment with Git and GitHub.
|
||||||
|
|
||||||
`git clone https://github.com/zpqrtbnk/test-repo.git .`
|
If you are new to Git and GitHub and found this repository through Google: feel free to clone the repository and experiment with it! You will not be able to push back to the repository, as it is *my* repository and I cannot let everybody push to it. The right way to do it on GitHub is:
|
||||||
|
|
||||||
We have pages at: http://zpqrtbnk.github.io/test-repo/
|
1. fork the repository in your own account,
|
||||||
|
2. make changes and push them in a branch of your own fork,
|
||||||
|
3. create a Pull Request in my repository.
|
||||||
|
|
||||||
We have an image in the README
|
I will get notified, will review the changes that you propose, and eventually will either merge the changes, or reject them. This *may* take some time as I am not actively monitoring nor maintaining this repository, as you can guess, but I try to be helpful ;)
|
||||||
|
|
||||||
|
Don't expect to find anything meaningful nor useful in the repository. Also, I happen to force-push a reset of everything from time to time. This means that I reset all history, including changes that you may have submitted. In theory, noone ever does this to a repository. But hey, this is a *test* repository after all.
|
||||||
|
|
||||||
|
The rest of this README file is mostly random stuff.
|
||||||
|
|
||||||
|
Clone the repository with: `git clone https://github.com/zpqrtbnk/test-repo.git .`
|
||||||
|
|
||||||
|
We have test GitHUb pages (from the `gh-pages` branch) at: http://zpqrtbnk.github.io/test-repo/
|
||||||
|
|
||||||
|
We have an image in the README (markdown)
|
||||||

|

|
||||||
|
|
||||||
etc
|
We have an image in the README (html)
|
||||||
etc
|
|
||||||
|
|
||||||
<img src="./wtf.jpg" />
|
<img src="./wtf.jpg" />
|
||||||
|
|
||||||
|
We have an image in the README (more html)
|
||||||
<p align="center" style="background:#000;padding:5px;color:#fff;font-size:150%;margin-bottom:64px">
|
<p align="center" style="background:#000;padding:5px;color:#fff;font-size:150%;margin-bottom:64px">
|
||||||
<img src="./wtf.jpg" />
|
<img src="./wtf.jpg" />
|
||||||
<span style="margin-left:48px;">wubble</span>
|
<span style="margin-left:48px;">wubble</span>
|
||||||
|
|||||||
3
dan.txt
Normal file
3
dan.txt
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
this is a new file only in my branch
|
||||||
|
|
||||||
|
changing something that won't conflict in master
|
||||||
1
duh/duh.txt
Normal file
1
duh/duh.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
duh
|
||||||
Reference in New Issue
Block a user