shiori/.github/workflows/_buildx.yml
Felipe Martin 8e9324ae8b
deps: update to go 1.20 + dependencies. Fixes CI (#628)
* deps: update go1.20 and dependencies

* fix: goreleaser archives

* ci: removed unused notify irc action

* ci: updated workflow dependency versions

* fix: typo
2023-07-02 12:50:29 +02:00

40 lines
1.4 KiB
YAML

name: "Build Docker"
on: workflow_call
jobs:
buildx:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: Build Docker
steps:
- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0
with:
fetch-depth: 0
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # 3.0.2
with:
name: dist
- name: Prep binaries
working-directory: .github/workflows/docker
run: |
mkdir binaries
cp -r ../../../shiori_linux_* binaries/
mv binaries/shiori_linux_arm_7 binaries/shiori_linux_arm
mv binaries/shiori_linux_amd64_v1 binaries/shiori_linux_amd64
gzip -d -S binaries/.gz__ -r .
chmod 755 binaries/shiori_linux_*/shiori
- name: Buildx
working-directory: .github/workflows/docker
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login -u "${{ github.repository_owner }}" --password-stdin ghcr.io
REPO=ghcr.io/${{ github.repository }}
TAG=$(git describe --tags)
if [ -z "$(git tag --points-at HEAD)" ]
then
TAG2="dev"
else
TAG2="latest"
fi
docker buildx create --use --name builder
docker buildx build -f Dockerfile.ci --platform=linux/amd64,arm64,linux/arm/v7 --push --output=type=registry --tag $REPO:$TAG --tag $REPO:$TAG2 .