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
on: push | |
jobs: | |
publish_docker_image: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_ACCESS_TOKEN }} | |
- name: Build and push multi-arch Docker image | |
run: | | |
docker buildx build --platform linux/amd64,linux/arm64 \ | |
-t planetariumhq/world-boss-service:git-${{ github.sha }} \ | |
--build-arg COMMIT=git-${{ github.sha }} \ | |
--push . | |
- name: Create and push Docker manifest | |
run: | | |
docker manifest create planetariumhq/world-boss-service:git-${{ github.sha }} \ | |
--amend planetariumhq/world-boss-service:git-${{ github.sha }}-amd64 \ | |
--amend planetariumhq/world-boss-service:git-${{ github.sha }}-arm64v8 | |
docker manifest push planetariumhq/world-boss-service:git-${{ github.sha }} |