|
| 1 | +# Build multi architectural docker images via GitHub Actions |
| 2 | + |
| 3 | +## Steps |
| 4 | + |
| 5 | +### Create a New GitHub Repository as a Fork |
| 6 | + |
| 7 | +1. Navigate to the [workshop-github-actions repository](https://github.com/ArmDeveloperEcosystem/workshop-github-actions/). |
| 8 | +2. Click the **Fork** button in the top-right corner of the page. |
| 9 | +3. In the **Create a fork** dialog: |
| 10 | + - Select your GitHub account or organization where you want to create the fork. |
| 11 | + - Optionally, provide a name for the forked repository (default is `workshop-github-actions`). |
| 12 | + - Click **Create fork**. |
| 13 | + |
| 14 | +### Retrieve Your Docker Username and Password |
| 15 | + |
| 16 | +1. **Docker Username**: |
| 17 | + Your Docker username is the name you use to log in to [Docker Hub](https://hub.docker.com/). |
| 18 | + |
| 19 | +2. **Docker Personal Access Token**: |
| 20 | + - Log in to [Docker Hub](https://hub.docker.com/). |
| 21 | + - Navigate to your account settings. |
| 22 | + - Go to Personal Access Token |
| 23 | + - Click on **Create Access Token**. |
| 24 | + - Provide a name for the token (e.g., `github-actions-token`). |
| 25 | + - Select the desired expiration date for the token. |
| 26 | + - Under **Access Permissions**, ensure you grant **read & write** access to repositories. |
| 27 | + - Click **Generate** and copy the token. |
| 28 | + **Note**: Make sure to save the token securely as it will not be shown again. |
| 29 | + |
| 30 | +### Add Docker Credentials to GitHub Actions |
| 31 | + |
| 32 | +1. Go to your GitHub repository. |
| 33 | +2. Click on the **Settings** tab. |
| 34 | +3. In the left sidebar, select **Secrets and variables** > **Actions**. |
| 35 | +4. Click the **New repository secret** button. |
| 36 | +5. Add the following secrets: |
| 37 | + - `DOCKER_USER`: Your Docker username. |
| 38 | + - `DOCKER_PAT`: Your Docker Personal Access Token we generated above. |
| 39 | + |
| 40 | +### Run the GitHub Actions Workflow |
| 41 | + |
| 42 | +1. Go to the `Actions` page for your GitHub repository. |
| 43 | +2. Trigger the `image-build.yml` workflow manually: |
| 44 | + - The workflow is located at [`.github/workflows/image-build.yml`](.github/workflows/image-build.yml) |
| 45 | + - From the `Actions` page, click **Run workflow**. |
| 46 | +3. Monitor the workflow execution: |
| 47 | + - Check the progress and logs in the **Actions** tab. |
| 48 | + - Ensure the workflow completes successfully without errors. |
| 49 | + |
| 50 | +Once the workflow finishes, your multi-architecture Docker images will be built and pushed to Docker Hub. |
0 commit comments