mirror of
https://github.com/Pull-Pal/pull-pal.git
synced 2024-09-27 14:26:06 -04:00
Draft Github CI Pipeline (#17)
This commit defines a basic CI pipeline for releasing Pull-Pal to prospective users. The artifacts include Pull-Pal's source and container.
This commit is contained in:
parent
b0e45216bc
commit
9f5258fe22
57
.github/workflows/build-tag-release.yml
vendored
Normal file
57
.github/workflows/build-tag-release.yml
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
name: Build, Tag, and Release
|
||||
|
||||
on:
|
||||
workflow_dispatch
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Grep the Short SHA
|
||||
uses: benjlevesque/short-sha@v2.2
|
||||
id: short-sha
|
||||
with:
|
||||
length: 6
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Lint Dockerfile
|
||||
uses: hadolint/hadolint-action@v3.1.0
|
||||
with:
|
||||
dockerfile: Dockerfile
|
||||
failure-threshold: error
|
||||
|
||||
- name: Build Docker Image
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile
|
||||
tags: "pullpal:${{ steps.short-sha.outputs.sha }}"
|
||||
push: false
|
||||
load: true
|
||||
|
||||
- name: Smoke Test Container
|
||||
run: docker run -d --name pullpal pullpal:${{ steps.short-sha.outputs.sha }}
|
||||
|
||||
- name: Dump and Deflate Container
|
||||
run: |
|
||||
docker save pullpal:${{ steps.short-sha.outputs.sha }} \
|
||||
| gzip -9kv > pullpalcontainer-${{ steps.short-sha.outputs.sha }}.tar.gz
|
||||
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: softprops/action-gh-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: "pullpal-${{ steps.short-sha.outputs.sha }}"
|
||||
body: "A digital assistant that writes code and collaborates with humans on git repositories!"
|
||||
files: pullpalcontainer-${{ steps.short-sha.outputs.sha }}.tar.gz
|
Loading…
Reference in New Issue
Block a user