Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,18 @@ jobs:
sudo apt-get install -yy autoconf automake make autogen autoconf libtool binutils git squashfs-tools libcryptsetup-dev libdevmapper-dev cryptsetup-bin squashfuse
(cd /tmp && git clone https://github.com/AgentD/squashfs-tools-ng && cd squashfs-tools-ng && ./autogen.sh && ./configure --prefix=/usr && make -j2 && sudo make -j2 install && sudo ldconfig -v)
(cd /tmp && git clone https://github.com/anuvu/squashfs && cd squashfs && make && sudo cp squashtool/squashtool /usr/bin)
- run: |
- if: github.event_name != 'release' || github.event.action != 'published'
name: Build and test
run: |
make check PRIVILEGE_LEVEL=${{ matrix.privilege-level }}
env:
REGISTRY_URL: localhost:5000
- if: github.event_name == 'release' && github.event.action == 'published'
name: Build and test released version
run: |
make check VERSION=${{ github.event.release.tag_name }}-${{ github.sha }} PRIVILEGE_LEVEL=${{ matrix.privilege-level }}
env:
REGISTRY_URL: localhost:5000
- uses: actions/cache@v3
id: restore-build
with:
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ name: ci

on:
push:
branches:
- main
pull_request:
schedule:
- cron: "0 0 * * 0" # weekly
release:
types:
- published
branches:
- main

jobs:
build:
Expand Down
19 changes: 11 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: "tagged-release"

on:
push:
tags:
- "v*"
release:
types:
- published

jobs:
ci:
Expand All @@ -26,9 +26,12 @@ jobs:
with:
path: stacker
key: ${{ github.sha }}
- uses: marvinpinto/action-automatic-releases@latest
- if: github.event_name == 'release' && github.event.action == 'published'
name: Publish artifacts on releases
uses: svenstaro/upload-release-action@v2
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: stacker

repo_token: ${{ secrets.GITHUB_TOKEN }}
file: stacker
tag: ${{ github.ref }}
overwrite: true
file_glob: true
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
GO_SRC=$(shell find . -path ./.build -prune -false -o -name \*.go)
VERSION=$(shell git describe --tags || git rev-parse HEAD)
VERSION?=$(shell git describe --tags || git rev-parse HEAD)
VERSION_FULL=$(if $(shell git status --porcelain --untracked-files=no),$(VERSION)-dirty,$(VERSION))

LXC_VERSION?=$(shell pkg-config --modversion lxc)
Expand Down