explode github actions

This commit is contained in:
akp 2024-12-03 19:44:18 +00:00
parent 62274f6023
commit ca0fc80a1a
No known key found for this signature in database
GPG key ID: CF8D58F3DEB20755

View file

@ -1,37 +0,0 @@
name: Docker Image CI
on:
push:
branches:
- "main"
workflow_dispatch:
env:
IMAGE_NAME: "ghcr.io/codemicro/palmatum"
concurrency: # Prevent two instances of this running at once
group: deploy-to-ghpages
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Make image tags
id: make_tags
run: |
echo "::set-output name=LATEST::$IMAGE_NAME:latest"
echo "::set-output name=VERSIONED::$IMAGE_NAME:$(git rev-parse --short HEAD)"
- name: Build Docker image
run: docker build . --file Dockerfile --tag ${{ steps.make_tags.outputs.LATEST }} --tag ${{ steps.make_tags.outputs.VERSIONED }}
- name: Login to ghcr.io
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io --username codemicro --password-stdin
- name: Push image
run: docker push --all-tags $IMAGE_NAME