3535 strategy :
3636 matrix :
3737 app : [ plural, cron, worker, rtc ]
38+ permissions :
39+ contents : ' read'
40+ id-token : ' write'
41+ packages : ' write'
3842 steps :
3943 - name : Checkout
4044 uses : actions/checkout@v3
@@ -47,22 +51,28 @@ jobs:
4751 # list of Docker images to use as base name for tags
4852 images : |
4953 ghcr.io/pluralsh/${{ matrix.app }}
50- dkr.plural.sh/plural/${{ matrix.app }}
51- gcr.io/pluralsh/${{ matrix.app }}
5254 # generate Docker tags based on the following events/attributes
5355 tags : |
5456 type=sha
57+ type=ref,event=pr
58+ type=ref,event=branch
5559 - name : Set up QEMU
5660 uses : docker/setup-qemu-action@v2
5761 - name : Set up Docker Buildx
5862 uses : docker/setup-buildx-action@v2
63+ - name : Login to GHCR
64+ uses : docker/login-action@v2
65+ with :
66+ registry : ghcr.io
67+ username : ${{ github.repository_owner }}
68+ password : ${{ secrets.GITHUB_TOKEN }}
5969 - name : Test Build ${{ matrix.app }} image
6070 uses : docker/build-push-action@v3
6171 with :
6272 context : " ."
6373 file : " ./Dockerfile"
64- push : false
65- load : true
74+ push : true
75+ load : false
6676 tags : ${{ steps.meta.outputs.tags }}
6777 labels : ${{ steps.meta.outputs.labels }}
6878 platforms : linux/amd64
@@ -118,8 +128,8 @@ jobs:
118128 - uses : actions/checkout@v3
119129 - uses : erlef/setup-beam@v1
120130 with :
121- elixir- version: ' 1.11.4 ' # Define the elixir version [required]
122- otp- version: ' 23.3 ' # Define the OTP version [required]
131+ version-file : .tool-versions
132+ version-type : strict
123133 - uses : azure/setup-helm@v3
124134 with :
125135 version : latest
@@ -134,14 +144,14 @@ jobs:
134144 uses : actions/cache@v3
135145 with :
136146 path : deps
137- key : ${{ runner.os }}-mix-5 -${{ hashFiles('**/mix.lock') }}
138- restore-keys : ${{ runner.os }}-mix-5
147+ key : ${{ runner.os }}-mix-6 -${{ hashFiles('**/mix.lock') }}
148+ restore-keys : ${{ runner.os }}-mix-6
139149 - name : Restore _build
140150 uses : actions/cache@v3
141151 with :
142152 path : _build
143- key : ${{ runner.os }}-mix-5 -${{ hashFiles('**/mix.lock') }}
144- restore-keys : ${{ runner.os }}-mix-5
153+ key : ${{ runner.os }}-mix-6 -${{ hashFiles('**/mix.lock') }}
154+ restore-keys : ${{ runner.os }}-mix-6
145155 - run : mix deps.get
146156 - run : mix test
147157 - uses : 8398a7/action-slack@v3
0 commit comments