Skip to content

Commit

Permalink
Update build.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
JeromeMBourgeois authored Feb 14, 2024
1 parent 3e17fc7 commit 892729d
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@ name: Build

on:
push:
branches:
- main
pull_request:
branches:
- main
tags:
- '*'

jobs:
build:
Expand All @@ -29,26 +26,35 @@ jobs:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Download war
uses: actions/download-artifact@v4
with:
name: war-file
path: target

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: List files in the repository
run: ls -la

- name: Extract tag name
id: vars
run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV

- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
file: Dockerfile
tags: inseefr/magma-back-office:latest
tags: inseefr/magma-back-office:${{ env.TAG_NAME }}

0 comments on commit 892729d

Please sign in to comment.