diff --git a/.github/workflows/ci-local.yml b/.github/workflows/ci-local.yml index 3218daa..50397a2 100644 --- a/.github/workflows/ci-local.yml +++ b/.github/workflows/ci-local.yml @@ -12,6 +12,11 @@ name: Deploy COVID scenario in Docker on: workflow_dispatch: +env: + CONTAINER_REGISTRY: ${{ vars.CONTAINER_REGISTRY }} + CONTAINER_REGISTRY_USERNAME: ${{ secrets.CONTAINER_REGISTRY_USERNAME }} + CONTAINER_REGISTRY_PASSWORD: ${{ secrets.CONTAINER_REGISTRY_ACCESS_TOKEN }} + jobs: deploy-ccr-covid: runs-on: [self-hosted, linux, X64] @@ -26,9 +31,9 @@ jobs: - name: Login to ACR uses: docker/login-action@v3 with: - registry: ${{ vars.CONTAINER_REGISTRY }} - username: ${{ secrets.CONTAINER_REGISTRY_USERNAME }} - password: ${{ secrets.CONTAINER_REGISTRY_ACCESS_TOKEN }} + registry: ${{ env.CONTAINER_REGISTRY }} + username: ${{ env.CONTAINER_REGISTRY_USERNAME }} + password: ${{ env.CONTAINER_REGISTRY_ACCESS_TOKEN }} - name: Add user to docker group run: sudo usermod -aG docker $USER diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7273ad0..e5200ac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,16 +61,16 @@ jobs: - name: Log in with Azure uses: azure/login@v1 with: - client-id: ${{ secrets.AZURE_CLIENT_ID }} - tenant-id: ${{ secrets.AZURE_TENANT_ID }} - subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} + client-id: ${{ env.AZURE_CLIENT_ID }} + tenant-id: ${{ env.AZURE_TENANT_ID }} + subscription-id: ${{ env.AZURE_SUBSCRIPTION_ID }} - name: Login to Docker Hub uses: docker/login-action@v3 with: - registry: ${{ vars.CONTAINER_REGISTRY }} - username: ${{ secrets.CONTAINER_REGISTRY_USERNAME }} - password: ${{ secrets.CONTAINER_REGISTRY_ACCESS_TOKEN }} + registry: ${{ env.CONTAINER_REGISTRY }} + username: ${{ env.CONTAINER_REGISTRY_USERNAME }} + password: ${{ env.CONTAINER_REGISTRY_ACCESS_TOKEN }} - name: Install az confcom extension run: az extension add --name confcom -y