Skip to content

Commit 00ffbc7

Browse files
committed
Add github action for releases
1 parent 612bdd0 commit 00ffbc7

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/release.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
8+
jobs:
9+
image:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout Code
13+
uses: actions/checkout@v2
14+
15+
- name: Login to GitHub Container Registry
16+
uses: docker/login-action@v1
17+
with:
18+
registry: ghcr.io
19+
username: ${{ github.repository_owner }}
20+
password: ${{ secrets.GITHUB_TOKEN }}
21+
22+
- name: Build and Push Docker Image
23+
uses: docker/build-push-action@v2
24+
with:
25+
push: true
26+
tags: |
27+
ghcr.io/${{ github.repository }}:${{ github.sha }}
28+
ghcr.io/${{ github.repository }}:latest
29+
30+
- name: Export tgz
31+
run: |
32+
docker save ghcr.io/${{ github.repository }}:latest > gitpod-eks-guide.tar
33+
34+
- name: Release
35+
uses: ncipollo/release-action@v1
36+
if: startsWith(github.ref, 'refs/tags/')
37+
with:
38+
artifacts: gitpod-eks-guide.tar
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)