Bump dawidd6/action-download-artifact from 2 to 6 in /.github/workflows #833
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create Docker image | |
on: | |
push: | |
branches: ['main'] | |
tags: ["*"] | |
pull_request: | |
branches: ['main'] | |
jobs: | |
build-and-push-image: | |
runs-on: ubuntu-latest | |
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job. | |
permissions: | |
contents: read | |
packages: write | |
strategy: | |
matrix: | |
service: | |
- name: GameServer | |
dockerfile: Dockerfile | |
container_id: refresh | |
- name: HttpsProxy | |
dockerfile: HttpsProxy.Dockerfile | |
container_id: refresh-httpsproxy | |
- name: PresenceServer | |
dockerfile: PresenceServer.Dockerfile | |
container_id: refresh-presenceserver | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Log in to the Container registry | |
uses: docker/[email protected] | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
# This step below will fill in things like name, description, etc. from the repository. | |
# It's helpful for us because it also fills in the version information automatically depending on how the job was invoked. | |
# See https://github.com/docker/metadata-action#basic | |
- name: Extract metadata for ${{ matrix.service.name }} | |
id: meta | |
uses: docker/[email protected] | |
with: | |
images: ghcr.io/${{ github.repository_owner }}/${{ matrix.service.container_id }} | |
- name: Build and push ${{ matrix.service.name }} | |
uses: docker/[email protected] | |
with: | |
context: . | |
file: ${{ matrix.service.dockerfile }} | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |