fix: ignore named pipes when copying project files (#172) #876
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Image Build | |
on: | |
push: | |
release: | |
types: [created] | |
workflow_dispatch: | |
jobs: | |
build-docker-image: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2.2.0 | |
with: | |
fetch-depth: 0 | |
- name: Insert extra files | |
run: | | |
echo ${{ secrets.DATA }} > further_link/extra/fl.dat | |
cat << EOF > further_link/extra/key.aes.pem | |
${{ secrets.CERT_PRIVATE_KEY }} | |
EOF | |
- name: Parse changelog version number | |
run: | | |
sudo apt install -y dpkg-dev | |
echo "VERSION=$(dpkg-parsechangelog -Sversion)" >> $GITHUB_ENV | |
- name: Generate human-readable non-release tag | |
if: github.event_name != 'release' || github.event.action != 'created' | |
run: | | |
echo "DOCKER_TAG=$(basename ${GITHUB_HEAD_REF:-$GITHUB_REF})-$GITHUB_RUN_NUMBER" >> $GITHUB_ENV | |
- name: Use version in release tag | |
if: github.event_name == 'release' && github.event.action == 'created' | |
run: | | |
echo "DOCKER_TAG=v${{ env.VERSION }}" >> $GITHUB_ENV | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
- name: Build and push | |
id: docker_build_push | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
push: true | |
tags: "pitop/pt-further-link:${{ env.DOCKER_TAG }}" | |
platforms: linux/amd64,linux/arm64 | |
build-args: | | |
PYTHON_PACKAGE_VERSION=${{ env.VERSION }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- name: Show image digest | |
run: echo ${{ steps.docker_build_push.outputs.digest }} |