mirror of
https://github.com/watn3y/steamsalty.git
synced 2025-10-25 09:51:02 +02:00
chore: Only tag images with branchname if changes are on master branch
This commit is contained in:
parent
9f582e4c75
commit
22c01b54b8
1 changed files with 6 additions and 5 deletions
11
.github/workflows/on-push.yml
vendored
11
.github/workflows/on-push.yml
vendored
|
|
@ -8,6 +8,7 @@ on:
|
||||||
- 'go.sum'
|
- 'go.sum'
|
||||||
- 'Dockerfile'
|
- 'Dockerfile'
|
||||||
- '.github/workflows/**'
|
- '.github/workflows/**'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker:
|
docker:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
@ -21,14 +22,14 @@ jobs:
|
||||||
- name: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{secrets.DOCKERHUB_USERNAME}}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{secrets.DOCKERHUB_TOKEN}}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
platforms: linux/amd64,linux/386,linux/arm64,linux/arm/v7,linux/riscv64
|
platforms: linux/amd64,linux/386,linux/arm64,linux/arm/v7,linux/riscv64
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
${{ github.repository }}:${{ github.ref_name }}
|
${{ github.repository }}:commit-${{ github.sha }}
|
||||||
${{ github.repository }}:commit-${{ github.sha }}
|
${{ github.ref_name == 'master' && format('{0}:{1}', github.repository, github.ref_name) || '' }}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue