-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (38 loc) · 1.37 KB
/
publish.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
33
34
35
36
37
38
39
40
41
42
name: Create and publish a Docker image
on:
push:
branches:
- main
env:
REGISTRY: ghcr.io
jobs:
publish-docker-images-matrix:
runs-on: ubuntu-latest
strategy:
matrix:
version: [ 3.8.6 ] # Define versions for matrix build https://git.bgbm.org/biocase/bps/-/releases
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: downcase IMAGE_NAME
run: |
echo "IMAGE_NAME=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
- name: Log in to the Container registry
uses: docker/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Docker image
run: |
docker build \
--build-arg BIOCASE_VERSION=${{ matrix.version }} \
-t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.version }} .
- name: Push Docker image
run: |
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.version }}