File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Create and publish a Docker image
2+
3+ on :
4+ push :
5+ branches :
6+ - ' master'
7+ tags :
8+ - ' *'
9+ pull_request :
10+ branches :
11+ - ' master'
12+
13+ env :
14+ REGISTRY : ghcr.io
15+ IMAGE_NAME : ${{ github.repository }}
16+
17+ jobs :
18+ build-and-push-image :
19+ runs-on : ubuntu-latest
20+ permissions :
21+ contents : read
22+ packages : write
23+
24+ steps :
25+ - name : Checkout repository
26+ uses : actions/checkout@v3
27+
28+ - name : Log in to the Container registry
29+ uses : docker/login-action@v3
30+ if : github.event_name != 'pull_request'
31+ with :
32+ registry : ${{ env.REGISTRY }}
33+ username : ${{ github.actor }}
34+ password : ${{ secrets.GITHUB_TOKEN }}
35+
36+ - name : Extract metadata (tags, labels) for Docker
37+ id : meta
38+ uses : docker/metadata-action@v5
39+ with :
40+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
41+ flavor : |
42+ latest=false
43+ tags : |
44+ # minimal
45+ type=ref,event=tag
46+ # set latest tag for default branch
47+ type=raw,value=latest,enable={{is_default_branch}}
48+
49+ - name : Build and push Docker image
50+ uses : docker/build-push-action@v4
51+ with :
52+ context : .
53+ push : ${{ github.event_name != 'pull_request' }}
54+ tags : ${{ steps.meta.outputs.tags }}
55+ labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change 1- FROM rockylinux:8.6
1+ FROM rockylinux:9
22LABEL maintainer=StackHPC
33
4- ENV SQUID_VERSION=4.15 \
4+ ENV SQUID_VERSION=5.5 \
55 SQUID_CACHE_DIR=/var/spool/squid \
66 SQUID_LOG_DIR=/var/log/squid \
77 SQUID_USER=squid
You can’t perform that action at this time.
0 commit comments