Skip to content

Commit

Permalink
Docker (#18)
Browse files Browse the repository at this point in the history
* Tweaking commands

* Another attempt

* Another attempt

* Changing GA
  • Loading branch information
ifilot authored Apr 23, 2024
1 parent 2c32c92 commit 443a0d5
Showing 1 changed file with 23 additions and 5 deletions.
28 changes: 23 additions & 5 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,32 @@ name: deploy Docker

on:
push:
branches: [ "master", "develop" ]
branches: [ "master" ]
tags:
- 'v*'
pull_request:
branches: [ "master", "develop" ]
branches: [ "master" ]

jobs:
create-release:
runs-on: ubuntu-latest
permissions: write-all
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

deploy:
runs-on: ubuntu-latest
#if: startsWith(github.ref, 'refs/tags/v')
if: startsWith(github.ref, 'refs/tags/v')

permissions:
contents: read
Expand All @@ -36,7 +54,7 @@ jobs:
- name: Grab short SHA
shell: bash
run: |
echo "SHORT_SHA=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_ENV
echo "SHORT_SHA=$(git rev-parse --short $GITHUB_SHA)" >> "$GITHUB_ENV"
- name: Build and push Docker images
uses: docker/build-push-action@v4
Expand All @@ -47,4 +65,4 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
GIT_HASH: ${{ env.SHORT_SHA }}
GIT_HASH=${{ env.SHORT_SHA }}

0 comments on commit 443a0d5

Please sign in to comment.