Skip to content

Commit c0331ab

Browse files
committed
Add: [Actions] switch to GitHub Container Repository
Also switch to v2 of OpenTTD/actions, as this provides the needed parameters to make this change.
1 parent ef666d8 commit c0331ab

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

.github/workflows/deployment.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ jobs:
1010

1111
steps:
1212
- name: Deployment in progress
13-
uses: openttd/actions/deployments-update@v1
13+
uses: openttd/actions/deployments-update@v2
1414
with:
1515
github-token: ${{ secrets.DEPLOYMENT_TOKEN }}
1616
state: in_progress
1717
description: "Deployment of ${{ github.event.deployment.payload.version }} to ${{ github.event.deployment.environment }} started"
1818

1919
- name: Deploy on AWS
20-
uses: openttd/actions/deploy-aws@v1
20+
uses: openttd/actions/deploy-aws@v2
2121
with:
2222
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
2323
aws-region: ${{ secrets.AWS_REGION }}
@@ -26,7 +26,7 @@ jobs:
2626

2727
- if: success()
2828
name: Deployment successful
29-
uses: openttd/actions/deployments-update@v1
29+
uses: openttd/actions/deployments-update@v2
3030
with:
3131
github-token: ${{ secrets.DEPLOYMENT_TOKEN }}
3232
state: success
@@ -35,7 +35,7 @@ jobs:
3535

3636
- if: failure() || cancelled()
3737
name: Deployment failed
38-
uses: openttd/actions/deployments-update@v1
38+
uses: openttd/actions/deployments-update@v2
3939
with:
4040
github-token: ${{ secrets.DEPLOYMENT_TOKEN }}
4141
state: failure

.github/workflows/publish.yml

+11-9
Original file line numberDiff line numberDiff line change
@@ -24,41 +24,43 @@ jobs:
2424

2525
- if: github.event_name == 'repository_dispatch'
2626
name: Repository dispatch
27-
uses: openttd/actions/checkout-dispatch@v1
27+
uses: openttd/actions/checkout-dispatch@v2
2828

2929
- name: Checkout tags and submodules
30-
uses: openttd/actions/checkout@v1
30+
uses: openttd/actions/checkout@v2
3131
with:
3232
with-tags: true
3333

3434
- name: Set variables
3535
id: vars
36-
uses: openttd/actions/docker-vars@v1
36+
uses: openttd/actions/docker-vars@v2
3737
with:
38-
docker-hub-username: ${{ secrets.DOCKER_USERNAME }}
38+
registry-username: ${{ secrets.GHCR_USERNAME }}
3939

4040
- name: Build
41-
uses: openttd/actions/docker-build@v1
41+
uses: openttd/actions/docker-build@v2
4242
with:
4343
name: ${{ steps.vars.outputs.name }}
4444
tag: ${{ steps.vars.outputs.tag }}
4545
tags: ${{ steps.vars.outputs.tags }}
4646
version: ${{ steps.vars.outputs.version }}
4747
date: ${{ steps.vars.outputs.date }}
48+
registry: ghcr.io
4849

4950
- if: steps.vars.outputs.dry-run == 'false'
5051
name: Publish
5152
id: publish
52-
uses: openttd/actions/docker-publish@v1
53+
uses: openttd/actions/docker-publish@v2
5354
with:
54-
docker-hub-username: ${{ secrets.DOCKER_USERNAME }}
55-
docker-hub-password: ${{ secrets.DOCKER_PASSWORD }}
55+
registry-username: ${{ secrets.GHCR_USERNAME }}
56+
registry-password: ${{ secrets.GHCR_PASSWORD }}
57+
registry: ghcr.io
5658
name: ${{ steps.vars.outputs.name }}
5759
tag: ${{ steps.vars.outputs.tag }}
5860

5961
- if: steps.vars.outputs.dry-run == 'false'
6062
name: Trigger deployment
61-
uses: openttd/actions/deployments-create@v1
63+
uses: openttd/actions/deployments-create@v2
6264
with:
6365
ref: ${{ steps.vars.outputs.sha }}
6466
environment: ${{ steps.vars.outputs.environment }}

0 commit comments

Comments
 (0)