Skip to content

Commit

Permalink
Add initial main workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
danielemery committed Feb 27, 2024
1 parent f2e9ffe commit 906540a
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Main

on:
push:
branches: ["main"]
pull_request: # TODO remove this line after testing
branches: ["main"]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Generate version based on date
run: echo "RELEASE_VERSION=$(date '+%Y-%m-%d_%l-%M')" >> $GITHUB_ENV

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ env.RELEASE_VERSION }}
build-args: |
APP_VERSION=${{ env.RELEASE_VERSION }}

0 comments on commit 906540a

Please sign in to comment.