Skip to content

Commit

Permalink
Merge pull request #112 from madflojo/docker-build
Browse files Browse the repository at this point in the history
chore(ci): fixing the docker build i broke
  • Loading branch information
madflojo authored May 25, 2024
2 parents d9c985d + 2ba2545 commit 18d419a
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,20 @@ on:
- main
tags:
- v*
pull_request:
branches:
- main
jobs:
build-latest:
docker-build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Get latest tag
run: |
git fetch --tags
echo "current_tag=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_ENV
echo "latest_tag=$(git describe --tags `git rev-list --tags --max-count=1`)" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
Expand All @@ -24,20 +34,15 @@ jobs:
uses: docker/build-push-action@v2
with:
platforms: linux/amd64,linux/arm64
push: true
push: ${{ if github.event_name == 'push', 'true', 'false' }}
tags: madflojo/tarmac:unstable
- name: Checkout code and fetch all tags
run: |
git fetch --tags
echo "current_tag=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_ENV
echo "latest_tag=$(git describe --tags `git rev-list --tags --max-count=1`)" >> $GITHUB_ENV
- name: Build and push (tag)
id: docker_build_tag
if: startsWith(github.ref, 'refs/tags/v')
uses: docker/build-push-action@v2
with:
platforms: linux/amd64,linux/arm64
push: true
push: ${{ if github.event_name == 'push', 'true', 'false' }}
# tag with the git tag v*
tags: |
madflojo/tarmac:${{ github.ref_name }}
Expand Down

0 comments on commit 18d419a

Please sign in to comment.