-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (27 loc) · 976 Bytes
/
docker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: docker
on:
workflow_dispatch:
inputs:
version:
description: 'version tag (e.g. 1.0.0)'
required: true
env:
IMAGE_NAME: f11r-operator
jobs:
docker:
name: Docker Build and Push
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
- name: Build, tag, and push image
env:
IMAGE_TAG: ${{ github.sha }}
run: |
docker build -t ghcr.io/believer-oss/$IMAGE_NAME:$IMAGE_TAG .
docker tag ghcr.io/believer-oss/$IMAGE_NAME:$IMAGE_TAG ghcr.io/believer-oss/$IMAGE_NAME:${{ github.event.inputs.version }}
docker push ghcr.io/believer-oss/$IMAGE_NAME:$IMAGE_TAG
docker push ghcr.io/believer-oss/$IMAGE_NAME:${{ github.event.inputs.version }}