Skip to content

Commit

Permalink
Merge pull request #208 from pspdev/only-build-latest
Browse files Browse the repository at this point in the history
Do not push container on tag
  • Loading branch information
diamant3 authored Jun 10, 2024
2 parents 276da18 + cf5d486 commit f6dd882
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
push:
branches:
- master
tags:
- v*
repository_dispatch:
types: [run_build]

Expand All @@ -17,16 +15,6 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Extract DOCKER_TAG using tag name
if: startsWith(github.ref, 'refs/tags/')
run: |
echo "DOCKER_TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Use default DOCKER_TAG
if: startsWith(github.ref, 'refs/tags/') != true
run: |
echo "DOCKER_TAG=latest" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

Expand All @@ -43,9 +31,9 @@ jobs:
- uses: docker/build-push-action@v5
with:
push: true
tags: ghcr.io/${{ github.repository }}:${{ env.DOCKER_TAG }}
tags: ghcr.io/${{ github.repository }}:latest
build-args: |
BASE_DOCKER_IMAGE=ghcr.io/${{ github.repository_owner }}/psptoolchain:${{ env.DOCKER_TAG }}
BASE_DOCKER_IMAGE=ghcr.io/${{ github.repository_owner }}/psptoolchain:latest
- name: Send Compile action
run: |
Expand All @@ -58,12 +46,12 @@ jobs:
repository: ${{ github.repository_owner }}/psp-packages
token: ${{ secrets.DISPATCH_TOKEN }}
event-type: ${{ env.NEW_DISPATCH_ACTION }}
client-payload: '{"ref": "${{ github.ref }}"}'
client-payload: '{"ref": "refs/heads/master"}'

- name: Repository Dispatch to psplinkusb
uses: peter-evans/repository-dispatch@v2
with:
repository: ${{ github.repository_owner }}/psplinkusb
token: ${{ secrets.DISPATCH_TOKEN }}
event-type: ${{ env.NEW_DISPATCH_ACTION }}
client-payload: '{"ref": "${{ github.ref }}"}'
client-payload: '{"ref": "refs/heads/master"}'

0 comments on commit f6dd882

Please sign in to comment.