Skip to content

Commit

Permalink
CI: Add release workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosperate committed May 17, 2022
1 parent 12800d0 commit a37566c
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Deploy versioned & latest

on:
release:
types: [published]

jobs:
deploy-base:
name: Deploy base image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
shell: bash
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build base image
run: docker build -t ghcr.io/mu-editor/mu-appimage:latest .
- name: Tag same base image with the versioned tag
run: docker tag ghcr.io/mu-editor/mu-appimage:latest ghcr.io/mu-editor/mu-appimage:${{ steps.get_version.outputs.VERSION }}
- name: Push base images to ghcr.io
run: |
docker push ghcr.io/mu-editor/mu-appimage:${{ steps.get_version.outputs.VERSION }}
docker push ghcr.io/mu-editor/mu-appimage:latest

0 comments on commit a37566c

Please sign in to comment.