Skip to content

Bump golang from 1.23.2-alpine3.19 to 1.23.3-alpine3.19 #66

Bump golang from 1.23.2-alpine3.19 to 1.23.3-alpine3.19

Bump golang from 1.23.2-alpine3.19 to 1.23.3-alpine3.19 #66

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ "main" ]
tags:
- 'v*'
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build the Docker image
run: docker build . --file Dockerfile --tag ghcr.io/prodyna/changelog-json:latest
# if tag, get the tag as variable
- name: Get tag if available
if: startsWith(github.ref, 'refs/tags/v')
run: echo "tag=${GITHUB_REF#refs/tags/*}" >> $GITHUB_ENV
# Login to the GitHub Container Registry
- name: Login to the GitHub Container Registry
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }}
# Push latest to GitHub Container Registry
- name: Push the latest Docker image to the GitHub Container Registry
run: docker push ghcr.io/prodyna/changelog-json:latest
# if tagged, push the image to the GitHub Container Registry
- name: Push the tagged Docker image to the GitHub Container Registry
if: startsWith(github.ref, 'refs/tags/v')
run: |
docker tag ghcr.io/prodyna/changelog-json:latest ghcr.io/prodyna/changelog-json:${{ env.tag }}
docker push ghcr.io/prodyna/changelog-json:${{ env.tag }}