Skip to content

Commit

Permalink
feat(ci): build everytime
Browse files Browse the repository at this point in the history
  • Loading branch information
tillepille committed Dec 18, 2023
1 parent 4ec68f3 commit 1e7a028
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Build and Publish Docker
name: Build and Publish Container

on:
push:
branches: [ main ]
on: [ push ]

jobs:
build:
Expand All @@ -15,15 +13,19 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build Docker image
run: |
docker buildx create --use
docker buildx inspect --bootstrap
docker buildx build --platform linux/amd64,linux/arm64 -t tillepille/diagrams::latest .
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: tillepille/diagrams:latest
- name: Push Docker image
if: github.ref == 'refs/heads/main'
run: |
echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
docker buildx create --use
docker buildx inspect --bootstrap
docker buildx build --platform linux/amd64,linux/arm64 -t tillepille/diagrams::latest --push .
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

0 comments on commit 1e7a028

Please sign in to comment.