Skip to content

Commit

Permalink
fix: add check to run all steps in conditions (#276)
Browse files Browse the repository at this point in the history
* add check to run all steps in conditions

* fix debug setup for testing gh-action

* fix exposer makefile locally

* remove debug pr
  • Loading branch information
Anmol1696 authored Oct 11, 2023
1 parent c3f3a80 commit c471714
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .github/workflows/starship-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,39 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- uses: dorny/paths-filter@v2
id: changes
with:
filters: |
src:
- '${{ matrix.type }}/**'
- name: Set up QEMU
if: steps.changes.outputs.src == 'true'
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
if: steps.changes.outputs.src == 'true'
uses: docker/setup-buildx-action@v2

- name: Login to Docker Hub
if: steps.changes.outputs.src == 'true'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Determine tag
if: steps.changes.outputs.src == 'true'
id: docker-tag
run: |
tag=$(date -u "+%Y%m%d")-$(echo ${GITHUB_SHA} | cut -c1-7)
echo Tag will be $tag
echo ::set-output name=version::$tag
- name: Build and push
if: steps.changes.outputs.src == 'true'
uses: docker/build-push-action@v4
with:
push: true
Expand Down
2 changes: 1 addition & 1 deletion exposer/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ DOCKER_REPO_NAME := starship
DOCKER_IMAGE := exposer
DOCKER_TAG_NAME := $(shell date '+%Y%m%d')-$(shell git rev-parse --short HEAD)

all: build run
all: build run-local

.PHONY: build
build:
Expand Down

0 comments on commit c471714

Please sign in to comment.