Skip to content

Commit

Permalink
ci: configure github actions to release docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
mrsimonemms committed Sep 5, 2021
1 parent 7e04e10 commit 5ffb017
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

name: release

on:
push:
tags:
- "*"

jobs:
image:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and Push Docker Image
uses: docker/build-push-action@v2
with:
push: true
tags: |
ghcr.io/${{ github.repository }}:${{ github.sha }}
ghcr.io/${{ github.repository }}:latest
- name: Export tgz
run: |
docker save ghcr.io/${{ github.repository }}:latest | gzip > gitpod-azure-aks-guide.tgz
- name: Release
uses: ncipollo/release-action@v1
if: startsWith(github.ref, 'refs/tags/')
with:
artifacts: gitpod-azure-aks-guide.tgz
allowUpdates: true
artifactErrorsFailBuild: true
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 5ffb017

Please sign in to comment.