-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: xiarui.xr <[email protected]>
- Loading branch information
1 parent
d190cf3
commit 8128967
Showing
2 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Release | ||
on: | ||
push: | ||
branches: | ||
- '*' | ||
pull_request: | ||
branches: | ||
- '*' | ||
# push: todo fix | ||
# tags: | ||
# - "v*" | ||
permissions: | ||
contents: write | ||
jobs: | ||
Publish: # Pack and publish image to Docker Hub and Github Release | ||
runs-on: ubuntu-latest | ||
container: | ||
image: smartir/smart-ir-builder:v0.1.0 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Build the Release | ||
run: | | ||
make release | ||
ls ./ # todo remove test | ||
ls ./_build # todo remove test | ||
ls ./_build/sir | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- name: Extract Metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: smartir/smartir | ||
- name: Build and Push Docker image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
push: true # ${{ github.event_name != 'pull_request' }} | ||
tags: v0.1.0 # ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
- name: Upload Artifact to Github Releases | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ir-linux-amd64-nightly | ||
path: ir.tgz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM centos:centos8 | ||
COPY _build/sir /sir | ||
COPY ir_example/hello_world.ir /sir/example/hello_world.ir | ||
|
||
RUN chmod +x /sir/bin/ir_cli | ||
|
||
ENV PATH="/sir/bin:${PATH}" | ||
ENV LANG=en_US.utf8 |