Skip to content

Commit

Permalink
Merge pull request #789 from rbgodwin-nt/master
Browse files Browse the repository at this point in the history
Fix for version display in Docker
  • Loading branch information
garethsb authored Apr 25, 2023
2 parents 4c7bcc6 + 402ccff commit ad37ed6
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 8 deletions.
33 changes: 25 additions & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,49 @@ on:

push:
branches:
- main
- master
- deploy-action
- master
- dev
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
${{ secrets.DOCKER_USERNAME }}/nmos-testing
tags: |
# Tag all builds with branch name and sha
type=sha,prefix=${{ github.ref_name }}-
# Tag if non-master branch with branch name and latest
type=raw,value=latest,prefix=${{ github.ref_name }}-,enable=${{ github.ref_name != 'master' }}
# Tag if master branch with latest (no branch name prefix)
type=raw,value=latest,enable=${{ github.ref_name == 'master' }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2.1.0
with:
platforms: all

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2.5.0

- name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v2.1.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build
uses: docker/build-push-action@v2
uses: docker/build-push-action@v4.0.0
with:
context: .
builder: ${{ steps.buildx.outputs.name }}
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/nmos-testing:latest
tags: ${{ steps.meta.outputs.tags }}
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ FROM ubuntu:bionic

WORKDIR /home/nmos-testing
ADD . .
ADD .git .git

RUN apt-get update \
&& export DEBIAN_FRONTEND=noninteractive \
Expand Down

0 comments on commit ad37ed6

Please sign in to comment.