Webpages tidied up #104
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
# .github/workflows/docker.yml | |
name: Docker Deploy | |
env: | |
regsitry: "ghcr.io" | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- "v*" | |
paths-ignore: | |
- "**/README.md" | |
- "docs/**" | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
architecture: [linux/amd64] | |
defaults: | |
run: | |
working-directory: ./ | |
steps: | |
#Get the latest version of the repository | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
#Get Current and DateTime for Build | |
- name: Set current date and time as an environment variable | |
run: echo "timestamp=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_ENV | |
- name: Print current date and time | |
run: echo ${{ env.timestamp }} | |
#Get the package.json version | |
- uses: martinbeentjes/npm-get-version-action@master | |
name: Get Version Number | |
id: version | |
with: | |
path: ./ | |
- name: Print Current Version | |
run: echo Building with version ${{ steps.version.outputs.current-version }} | |
#Docker Buildx Setup | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v2 | |
with: | |
buildkitd-flags: --debug | |
- name: List available platforms | |
run: echo ${{ steps.buildx.outputs.platforms }} | |
#Docker Registry Login | |
- name: Login to GHCR Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.regsitry }} | |
username: ${{ secrets.GH_USER }} | |
password: ${{ secrets.GH_TOKEN }} | |
logout: false | |
#Docker Build Image and Push to Registry | |
- name: Build and push to registry | |
uses: docker/build-push-action@v3 | |
with: | |
context: "." | |
platforms: ${{ matrix.architecture}} | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: | | |
${{env.regsitry}}/ryanmccartney/ffmpeg-docker:latest | |
${{env.regsitry}}/ryanmccartney/ffmpeg-docker:${{steps.version.outputs.current-version}} | |
outputs: type=registry | |
build-args: | | |
DECKLINK_SUPPORT="false" | |
NDI_SUPPORT="false" | |
NON_FREE="false" | |
labels: | | |
author=${{github.actor}} | |
version=${{steps.version.outputs.current-version}} | |
org.opencontainers.image.licenses=Apache-2.0 | |
org.opencontainers.image.source=${{github.server_url}}/${{github.repository}} | |
info.mccartney.ryan.build.timestamp=${{env.timestamp}} | |
info.mccartney.ryan.build.number=${{github.run_number}} | |
info.mccartney.ryan.build.id=${{github.run_id}} | |
info.mccartney.ryan.build.branch=${{github.ref_name}} | |
info.mccartney.ryan.build.commit=${{github.sha}} | |
info.mccartney.ryan.build.repository=${{github.server_url}}/${{github.repository}} |