Skip to content

Merge pull request #6 from Vanilla-OS/dependabot/go_modules/golang.or… #11

Merge pull request #6 from Vanilla-OS/dependabot/go_modules/golang.or…

Merge pull request #6 from Vanilla-OS/dependabot/go_modules/golang.or… #11

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ "main", "dev" ]
pull_request:
branches: [ "dev" ]
env:
REGISTRY_USER: ${{ github.actor }}
REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
jobs:
build:
if: ${{ !contains(github.event.head_commit.message, '(skip)') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set variables
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD) >> $GITHUB_OUTPUT"
- name: Build the Docker image
run: docker build . --file Containerfile --tag vanilla-os/chronos:${{ github.ref_name }}
# Push the image to GHCR (Image Registry)
- name: Push To GHCR
run: |
docker tag vanilla-os/chronos:${{ github.ref_name }} ghcr.io/vanilla-os/chronos:${{ github.ref_name }}
docker login ghcr.io -u ${{ env.REGISTRY_USER }} -p ${{ env.REGISTRY_PASSWORD }}
docker image push "ghcr.io/vanilla-os/chronos:${{ github.ref_name }}"