johnwmail build #17
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: Build and release container | |
run-name: ${{ github.actor }} build | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "22 14 4 * *" # Build once per month | |
push: | |
branches: | |
- CICD | |
paths-ignore: | |
- .github/workflows/* | |
- .gitea/workflows/* | |
- .gitlab-ci.* | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
#container: "${{ secrets.DOCKER_REPO }}/actbuildx:latest" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set RELEASE_DATE | |
run: | | |
set -x | |
echo "RELEASE_DATE=$(date --rfc-3339=date)" >> ${GITHUB_ENV} | |
echo "REPO_NAME=$(echo ${{ github.repository }} | sed -E 's,.+/([^/]+),\1,')" >> ${GITHUB_ENV} | |
git clone https://github.com/iv-org/invidious.git | |
cd ${{ github.workspace }}/invidious && patch -p0 < ../invidious-login_only.diff.txt | |
mv * ${{ github.workspace }}/ | |
cd ${{ github.workspace }}/ | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to registry | |
uses: docker/login-action@v3 | |
with: | |
registry: docker.io | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and push Docker AMD64/ARM64 image for latest | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: docker/Dockerfile.arm64 | |
platforms: linux/amd64, linux/arm64 | |
push: true | |
tags: | | |
${{ secrets.DOCKER_REPO }}/${{ env.REPO_NAME }}:latest | |
${{ secrets.DOCKER_REPO }}/${{ env.REPO_NAME }}:${{ env.RELEASE_DATE }} |