Skip to content

Commit

Permalink
second first try
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Knecht committed Aug 31, 2023
1 parent e528235 commit ab4e302
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 31 deletions.
26 changes: 3 additions & 23 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,6 @@ jobs:
- name: Checkout
uses: actions/checkout@master

#- uses: actions/setup-go@v3
# name: go-cache
# with:
# go-version: '1.20'
# check-latest: false
# cache: true

#- name: Build
# env:
# GOOS: linux
# CGO_ENABLED: 0
# run: go build -v -o gargantua

- name: Build container in cache
if: fromJSON(env.should_push_image)
run: |
docker buildx create --use
docker buildx build --platform linux/amd64 -t $app_image:${GIT_COMMIT_SHORT_HASH:-dev} -f Dockerfile .
#docker buildx build --platform linux/amd64,linux/arm64 -t $app_image:${GIT_COMMIT_SHORT_HASH:-dev} cicd/Dockerfile .
- name: Compute Docker Tag
if: fromJSON(env.should_push_image)
id: compute_docker_tag
Expand All @@ -56,20 +36,20 @@ jobs:
exit 1
fi
- name: Docker Login
- name: Docker setup env
if: fromJSON(env.should_push_image)
run: |
echo "${{ secrets.DOCKER_HUB_PASSWORD }}" \
| docker login -u "${{ secrets.DOCKER_HUB_USER }}" --password-stdin
- name: Docker build from cache and push
- name: Docker build and push
if: fromJSON(env.should_push_image)
run: |
docker buildx build --push --platform linux/amd64,linux/arm64 \
-t $app_image:${{ steps.compute_docker_tag.outputs.DOCKER_TAG }} \
-f cicd/Dockerfile .
- name: Docker build from cache & push latest
- name: Docker build & push latest
if: |
github.event_name == 'push' && (
startsWith(github.event.ref, 'refs/tags/')
Expand Down
8 changes: 0 additions & 8 deletions cicd/Dockerfile.bak

This file was deleted.

0 comments on commit ab4e302

Please sign in to comment.