Skip to content

Commit f7c5f04

Browse files
1st attempt to publish binary to git.vdb.to from github release
1 parent 43e776a commit f7c5f04

File tree

1 file changed

+15
-39
lines changed

1 file changed

+15
-39
lines changed

.github/workflows/publish.yaml

Lines changed: 15 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -12,50 +12,26 @@ jobs:
1212
steps:
1313
- uses: actions/checkout@v2
1414
- name: Run docker build
15-
run: docker build -t cerc-io/go-ethereum -f Dockerfile .
15+
run: |
16+
echo ::set-output name=sha::$(echo ${GITHUB_SHA:0:7})
17+
echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/tags/})
1618
- name: Get the version
1719
id: vars
1820
run: echo ::set-output name=sha::$(echo ${GITHUB_SHA:0:7})
1921
- name: Tag docker image
20-
run: docker tag cerc-io/go-ethereum docker.pkg.github.com/cerc-io/go-ethereum/go-ethereum:${{steps.vars.outputs.sha}}
22+
run: docker tag cerc-io/go-ethereum git.vdb.to/cerc-io/go-ethereum/go-ethereum:${{steps.vars.outputs.sha}}
23+
- name: Tag docker image
24+
run: docker tag git.vdb.to/cerc-io/go-ethereum/go-ethereum:${{steps.vars.outputs.sha}} git.vdb.to/cerc-io/go-ethereum/go-ethereum:${{steps.vars.outputs.tag}}
2125
- name: Docker Login
22-
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login https://docker.pkg.github.com -u vulcanize --password-stdin
26+
run: echo ${{ secrets.GITEA_TOKEN }} | docker login https://git.vdb.to -u vulcanize --password-stdin
2327
- name: Docker Push
24-
run: docker push docker.pkg.github.com/cerc-io/go-ethereum/go-ethereum:${{steps.vars.outputs.sha}}
25-
push_to_registries:
26-
name: Publish assets to Release
27-
runs-on: ubuntu-latest
28-
needs: build
29-
steps:
30-
- name: Get the version
31-
id: vars
32-
run: |
33-
echo ::set-output name=sha::$(echo ${GITHUB_SHA:0:7})
34-
echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/tags/})
35-
- name: Docker Login to Github Registry
36-
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login https://docker.pkg.github.com -u vulcanize --password-stdin
37-
- name: Docker Pull
38-
run: docker pull docker.pkg.github.com/cerc-io/go-ethereum/go-ethereum:${{steps.vars.outputs.sha}}
28+
run: docker push git.vdb.to/cerc-io/go-ethereum/go-ethereum:${{steps.vars.outputs.sha}}
29+
- name: Docker Push TAGGED
30+
run: docker push git.vdb.to/cerc-io/go-ethereum/go-ethereum:${{steps.vars.outputs.tag}}
3931
- name: Copy ethereum binary file
40-
run: docker run --rm --entrypoint cat docker.pkg.github.com/cerc-io/go-ethereum/go-ethereum:${{steps.vars.outputs.sha}} /usr/local/bin/geth > geth-linux-amd64
41-
- name: Docker Login to Docker Registry
42-
run: echo ${{ secrets.VULCANIZEJENKINS_PAT }} | docker login -u vulcanizejenkins --password-stdin
43-
- name: Tag docker image
44-
run: docker tag docker.pkg.github.com/cerc-io/go-ethereum/go-ethereum:${{steps.vars.outputs.sha}} vulcanize/vdb-geth:${{steps.vars.outputs.tag}}
45-
- name: Docker Push to Docker Hub
46-
run: docker push vulcanize/vdb-geth:${{steps.vars.outputs.tag}}
47-
- name: Get release
48-
id: get_release
49-
uses: bruceadams/[email protected]
50-
env:
51-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52-
- name: Upload Release Asset
53-
id: upload-release-asset
54-
uses: actions/upload-release-asset@v1
55-
env:
56-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
run: docker run --rm --entrypoint cat git.vdb.to/cerc-io/go-ethereum/go-ethereum:${{steps.vars.outputs.sha}} /usr/local/bin/geth > geth-linux-amd64
33+
- name: curl
34+
uses: enflo/curl-action@master
5735
with:
58-
upload_url: ${{ steps.get_release.outputs.upload_url }}
59-
asset_path: geth-linux-amd64
60-
asset_name: geth-linux-amd64
61-
asset_content_type: application/octet-stream
36+
curl: --user circcicd:${{ secrets.GITEA_TOKEN }} --upload-file geth-linux-amd64 https://gitvdb.to/api/packages/cerc-io/generic/go-ethereum/v1.10.23-statediff-alpha-unstable/geth-linux-amd64
37+

0 commit comments

Comments
 (0)