@ -56,7 +56,7 @@ jobs:
uses : actions/checkout@v2.4.0
with:
ref : ${{ github.event.release.target_commitish }}
token : ${{ secrets.BOTT Y_GITHUB_TOKEN }}
token : ${{ secrets.ITCH Y_GITHUB_TOKEN }}
- name : Install toolchain from `rust-toolchain.toml`
run : rustup show
@ -139,7 +139,7 @@ jobs:
- name : Upload archive
uses : actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN : ${{ secrets.BOTT Y_GITHUB_TOKEN }}
GITHUB_TOKEN : ${{ secrets.ITCH Y_GITHUB_TOKEN }}
with:
upload_url : ${{ github.event.release.upload_url }}
asset_path : ./${{ steps.create-archive-name.outputs.archive }}
@ -154,8 +154,13 @@ jobs:
permissions:
contents : read
packages : write
strategy:
matrix:
include:
- bin : maker
- bin : taker
env:
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN : ${{ secrets.ITCHY_ GITHUB_TOKEN }}
steps:
- name : Checkout tagged commit
uses : actions/checkout@v2.4.0
@ -176,7 +181,7 @@ jobs:
- name : Download release from github
run : |
gh release download ${{ github.event.release.tag_name }} -p '*Linux_x86_64*' -p '*aarch64*' -p '*armv7*'
gh release download ${{ github.event.release.tag_name }} -p '${{matrix.bin}} *Linux_x86_64*' -p '${{matrix.bin}} *aarch64*' -p '${{matrix.bin}} *armv7*'
- name : Unpack archives
run : |
@ -186,32 +191,24 @@ jobs:
# when building the image. This variable is either
# `linux/amd64/`, `linux/arm64/` or `linux/arm/v7`. Hence we need to extract into subfolders.
7z x maker_${{ github.event.release.tag_name }}_Linux_aarch64.tar -olinux/arm64/
7z x taker_${{ github.event.release.tag_name }}_Linux_aarch64.tar -olinux/arm64/
7z x ${{matrix.bin}}_${{ github.event.release.tag_name }}_Linux_aarch64.tar -olinux/arm64/
7z x maker_${{ github.event.release.tag_name }}_Linux_x86_64.tar -olinux/amd64/
7z x taker_${{ github.event.release.tag_name }}_Linux_x86_64.tar -olinux/amd64/
7z x ${{matrix.bin}}_${{ github.event.release.tag_name }}_Linux_x86_64.tar -olinux/amd64/
7z x maker_${{ github.event.release.tag_name }}_Linux_armv7.tar -olinux/arm/v7
7z x taker_${{ github.event.release.tag_name }}_Linux_armv7.tar -olinux/arm/v7
7z x ${{matrix.bin}}_${{ github.event.release.tag_name }}_Linux_armv7.tar -olinux/arm/v7
- name : Build maker docker image
- name : Build docker image for ${{matrix.bin}}
run : |
docker buildx build \
--push \
--platform linux/amd64,linux/arm64,linux/arm/v7 \
--label "org.opencontainers.image.source https://github.com/${{ github.repository }}" \
--tag ghcr.io/${{ github.repository }}/maker:${{ github.event.release.tag_name }} \
--build-arg BINARY_PATH=maker \
.
VERSION=${{ github.event.release.tag_name }}
if [ "$VERSION" = "preview" ]; then
VERSION=latest
fi
- name : Build taker docker image
run : |
docker buildx build \
--push \
--platform linux/amd64,linux/arm64,linux/arm/v7 \
--label "org.opencontainers.image.source https://github.com/${{ github.repository }}" \
--tag ghcr.io/${{ github.repository }}/taker:${{ github.event.release.tag_name } } \
--build-arg BINARY_PATH=taker \
--tag ghcr.io/${{ github.repository }}/${{matrix.bin}}:${VERSION } \
--build-arg BINARY_PATH=${{matrix.bin}} \
.