Skip to content

Commit

Permalink
ci: add
Browse files Browse the repository at this point in the history
  • Loading branch information
jclab-joseph committed Aug 11, 2021
1 parent 1a1b7ad commit 2e1993a
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/pkgs-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: pkgs build
on: [push, pull_request]
jobs:
push_to_registry:
name: build linuxkit package
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Istall linuxkit
run: mkdir -p build && curl -L -o build/linuxkit https://github.com/linuxkit/linuxkit/releases/download/v0.8/linuxkit-linux-amd64 && chmod +x build/linuxkit
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build Packages
run: |
build/linuxkit pkg build --hash-path . -network -org jclab pkg/securekit-sftpd
build/linuxkit pkg build --hash-path . -network -org jclab pkg/securekit-disk
28 changes: 28 additions & 0 deletions .github/workflows/pkgs-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: pkgs publish
on:
release:
types:
- created
jobs:
push_to_registry:
name: build linuxkit package
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Istall linuxkit
run: mkdir -p build && curl -L -o build/linuxkit https://github.com/linuxkit/linuxkit/releases/download/v0.8/linuxkit-linux-amd64 && chmod +x build/linuxkit
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build Packages
run: |
build/linuxkit pkg push --hash-path . -disable-content-trust -network -org jclab pkg/securekit-sftpd
build/linuxkit pkg push --hash-path . -disable-content-trust -network -org jclab pkg/securekit-disk

0 comments on commit 2e1993a

Please sign in to comment.