This commit is contained in:
19
.github/workflows/release.yaml
vendored
19
.github/workflows/release.yaml
vendored
@ -13,18 +13,20 @@ jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ./.github/actions/init
|
||||
|
||||
- name: Check
|
||||
- name: check
|
||||
run: nix flake check
|
||||
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
needs: check
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ./.github/actions/init
|
||||
|
||||
- name: Build
|
||||
- name: build
|
||||
run: >
|
||||
nix build
|
||||
.#trevstack-linux-amd64
|
||||
@ -34,7 +36,7 @@ jobs:
|
||||
.#trevstack-darwin-amd64
|
||||
.#trevstack-darwin-arm64
|
||||
|
||||
- name: Release
|
||||
- name: release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
generate_release_notes: true
|
||||
@ -45,9 +47,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: release
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ./.github/actions/init
|
||||
|
||||
- name: Set env
|
||||
- name: set env
|
||||
run: |
|
||||
TAG=${{ github.ref_name }}
|
||||
VERSION=${TAG#v}
|
||||
@ -56,20 +59,20 @@ jobs:
|
||||
echo "VERSION=${VERSION}" >> $GITHUB_ENV
|
||||
echo "REGISTRY=${REGISTRY}" >> $GITHUB_ENV
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
- name: login to github container registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build & Load Images
|
||||
- name: build & load images
|
||||
run: |
|
||||
nix build .#trevstack-linux-amd64-image && ./result | docker load
|
||||
nix build .#trevstack-linux-arm64-image && ./result | docker load
|
||||
nix build .#trevstack-linux-arm-image && ./result | docker load
|
||||
|
||||
- name: Push Images
|
||||
- name: push images
|
||||
run: |
|
||||
docker image tag trevstack:$VERSION-amd64 $REGISTRY/$GITHUB_REPOSITORY:$VERSION-amd64
|
||||
docker push $REGISTRY/$GITHUB_REPOSITORY:$VERSION-amd64
|
||||
@ -80,7 +83,7 @@ jobs:
|
||||
docker image tag trevstack:$VERSION-arm $REGISTRY/$GITHUB_REPOSITORY:$VERSION-arm
|
||||
docker push $REGISTRY/$GITHUB_REPOSITORY:$VERSION-arm
|
||||
|
||||
- name: Push Manifest
|
||||
- name: push manifest
|
||||
run: |
|
||||
docker manifest create $REGISTRY/$GITHUB_REPOSITORY:$VERSION \
|
||||
$REGISTRY/$GITHUB_REPOSITORY:$VERSION-amd64 \
|
||||
|
Reference in New Issue
Block a user