From c0331aba6d4aeaa1a99752839787653f0633ec03 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Wed, 16 Sep 2020 23:26:56 +0200 Subject: [PATCH] Add: [Actions] switch to GitHub Container Repository Also switch to v2 of OpenTTD/actions, as this provides the needed parameters to make this change. --- .github/workflows/deployment.yml | 8 ++++---- .github/workflows/publish.yml | 20 +++++++++++--------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index ce9d03b..21ca865 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -10,14 +10,14 @@ jobs: steps: - name: Deployment in progress - uses: openttd/actions/deployments-update@v1 + uses: openttd/actions/deployments-update@v2 with: github-token: ${{ secrets.DEPLOYMENT_TOKEN }} state: in_progress description: "Deployment of ${{ github.event.deployment.payload.version }} to ${{ github.event.deployment.environment }} started" - name: Deploy on AWS - uses: openttd/actions/deploy-aws@v1 + uses: openttd/actions/deploy-aws@v2 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-region: ${{ secrets.AWS_REGION }} @@ -26,7 +26,7 @@ jobs: - if: success() name: Deployment successful - uses: openttd/actions/deployments-update@v1 + uses: openttd/actions/deployments-update@v2 with: github-token: ${{ secrets.DEPLOYMENT_TOKEN }} state: success @@ -35,7 +35,7 @@ jobs: - if: failure() || cancelled() name: Deployment failed - uses: openttd/actions/deployments-update@v1 + uses: openttd/actions/deployments-update@v2 with: github-token: ${{ secrets.DEPLOYMENT_TOKEN }} state: failure diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8ffa5fe..823f684 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -24,41 +24,43 @@ jobs: - if: github.event_name == 'repository_dispatch' name: Repository dispatch - uses: openttd/actions/checkout-dispatch@v1 + uses: openttd/actions/checkout-dispatch@v2 - name: Checkout tags and submodules - uses: openttd/actions/checkout@v1 + uses: openttd/actions/checkout@v2 with: with-tags: true - name: Set variables id: vars - uses: openttd/actions/docker-vars@v1 + uses: openttd/actions/docker-vars@v2 with: - docker-hub-username: ${{ secrets.DOCKER_USERNAME }} + registry-username: ${{ secrets.GHCR_USERNAME }} - name: Build - uses: openttd/actions/docker-build@v1 + uses: openttd/actions/docker-build@v2 with: name: ${{ steps.vars.outputs.name }} tag: ${{ steps.vars.outputs.tag }} tags: ${{ steps.vars.outputs.tags }} version: ${{ steps.vars.outputs.version }} date: ${{ steps.vars.outputs.date }} + registry: ghcr.io - if: steps.vars.outputs.dry-run == 'false' name: Publish id: publish - uses: openttd/actions/docker-publish@v1 + uses: openttd/actions/docker-publish@v2 with: - docker-hub-username: ${{ secrets.DOCKER_USERNAME }} - docker-hub-password: ${{ secrets.DOCKER_PASSWORD }} + registry-username: ${{ secrets.GHCR_USERNAME }} + registry-password: ${{ secrets.GHCR_PASSWORD }} + registry: ghcr.io name: ${{ steps.vars.outputs.name }} tag: ${{ steps.vars.outputs.tag }} - if: steps.vars.outputs.dry-run == 'false' name: Trigger deployment - uses: openttd/actions/deployments-create@v1 + uses: openttd/actions/deployments-create@v2 with: ref: ${{ steps.vars.outputs.sha }} environment: ${{ steps.vars.outputs.environment }}