Update .github/workflows/master.yml
This commit is contained in:
parent
84da36d953
commit
4b51ff0878
56
.github/workflows/master.yml
vendored
56
.github/workflows/master.yml
vendored
@ -1,51 +1,31 @@
|
||||
name: Build and Push Docker images
|
||||
name: Release build and push docker image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- '*'
|
||||
paths:
|
||||
- 'version.txt'
|
||||
workflow_dispatch:
|
||||
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
build-and-push-release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Read Version
|
||||
id: version
|
||||
run: echo "::set-output name=VERSION::$(cat version.txt)"
|
||||
- name: Read Version
|
||||
id: version
|
||||
run: echo "::set-output name=VERSION::$(cat version.txt)"
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
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
|
||||
- name: Call common build workflow
|
||||
uses: ./.github/actions/common-docker-build
|
||||
with:
|
||||
build_tags: |
|
||||
csmith1865/obscreen:v${{ steps.version.outputs.VERSION }}
|
||||
csmith1865/obscreen:latest
|
||||
manifest_tags: type=semver,pattern=v${{ steps.version.outputs.VERSION }}
|
||||
flavor: latest=true
|
||||
docker_username: ${{ secrets.DOCKER_USERNAME }}
|
||||
docker_password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user