diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6255a59..15f6435 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,6 +8,7 @@ on: jobs: build: + if: github.event.base_ref == 'refs/heads/main' || github.event.ref == 'refs/heads/main' strategy: fail-fast: false matrix: @@ -89,7 +90,7 @@ jobs: images: | ${{ vars.DOCKERHUB_REPO }} tags: | - type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} + type=raw,value=latest type=sha type=ref,event=branch type=ref,event=pr diff --git a/.github/workflows/document.yml b/.github/workflows/document.yml new file mode 100644 index 0000000..b3b291c --- /dev/null +++ b/.github/workflows/document.yml @@ -0,0 +1,24 @@ +name: Update Docker Hub Description +on: + push: + branches: + - main + paths: + - README.md + - .github/workflows/document.yml + workflow_dispatch: +jobs: + description: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Docker Hub Description + uses: peter-evans/dockerhub-description@v4 + with: + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + repository: ${{ vars.DOCKERHUB_REPO }} + readme-filepath: ./README.md + short-description: ${{ github.event.repository.description }} + enable-url-completion: true