Skip to content

Commit

Permalink
Create release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
eexit authored May 20, 2022
1 parent 1160f95 commit 8bbcb6e
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: build
on:
push:
branches: [ master ]
tags: [ 'v[0-9]+.[0-9]+.[0-9]+*' ]
pull_request:
jobs:
publish:
name: Docker publish
if: contains(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Retrieve tag
id: tagref
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- name: Build and push
uses: docker/build-push-action@v3
with:
platforms: |
linux/amd64
linux/arm64
tags: |
${{ github.repository }}:${{ steps.tagref.outputs.tag }}
${{ github.repository }}:latest
push: true
- name: Update repo description
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
repository: ${{ github.repository }}

0 comments on commit 8bbcb6e

Please sign in to comment.