Update .github/workflows/master.yml
This commit is contained in:
parent
f827c6cbdd
commit
15ffdff381
48
.github/workflows/master.yml
vendored
48
.github/workflows/master.yml
vendored
@ -1,51 +1,31 @@
|
|||||||
name: Build and Push Docker images
|
name: Release build and push docker image
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- '*'
|
||||||
paths:
|
paths:
|
||||||
- 'version.txt'
|
- 'version.txt'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push:
|
build-and-push-release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Read Version
|
- name: Read Version
|
||||||
id: version
|
id: version
|
||||||
run: echo "::set-output name=VERSION::$(cat version.txt)"
|
run: echo "::set-output name=VERSION::$(cat version.txt)"
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Call common build workflow
|
||||||
uses: docker/setup-qemu-action@v1
|
uses: ./.github/actions/common-docker-build
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v1
|
|
||||||
|
|
||||||
- name: Login to DockerHub
|
|
||||||
uses: docker/login-action@v1
|
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
build_tags: |
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
csmith1865/obscreen:v${{ steps.version.outputs.VERSION }}
|
||||||
|
csmith1865/obscreen:latest
|
||||||
- name: Build and push
|
manifest_tags: type=semver,pattern=v${{ steps.version.outputs.VERSION }}
|
||||||
uses: docker/build-push-action@v2
|
flavor: latest=true
|
||||||
with:
|
docker_username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
context: .
|
docker_password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
file: ./Dockerfile
|
|
||||||
push: true
|
|
||||||
tags: |
|
|
||||||
jierka/obscreen:v${{ steps.version.outputs.VERSION }}
|
|
||||||
jierka/obscreen:latest
|
|
||||||
platforms: linux/amd64, linux/arm64/v8, linux/arm/v7
|
|
||||||
|
|
||||||
- name: Create and push manifest
|
|
||||||
uses: docker/metadata-action@v3
|
|
||||||
with:
|
|
||||||
images: jierka/obscreen
|
|
||||||
tags: type=semver,pattern=v{{version}}
|
|
||||||
flavor: |
|
|
||||||
latest=true
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user