remove the VirtualSize field from image inspect formatting #9
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: Build and Push to ACR | |
on: | |
push: | |
branches: | |
- 'main' | |
jobs: | |
build-and-push-to-acr: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: 'Checkout GitHub Action' | |
uses: actions/checkout@v4 | |
- name: 'Build and push image to ACR' | |
uses: azure/docker-login@v1 | |
with: | |
login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }} | |
username: ${{ secrets.ACR_USERNAME }} | |
password: ${{ secrets.ACR_PASSWORD }} | |
- run: | | |
docker build . -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/ssl-checker-webapp:${{ github.sha }} | |
docker tag ${{ secrets.REGISTRY_LOGIN_SERVER }}/ssl-checker-webapp:${{ github.sha }} ${{ secrets.REGISTRY_LOGIN_SERVER }}/ssl-checker-webapp:latest | |
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/ssl-checker-webapp:${{ github.sha }} | |
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/ssl-checker-webapp:latest | |
echo '--------------------' | |
docker inspect --format ' | |
ID: {{.Id}} | |
RepoTags: {{.RepoTags}} | |
RepoDigests: {{.RepoDigests}} | |
Created: {{.Created}} | |
Author: {{.Author}} | |
Architecture: {{.Architecture}} | |
OS: {{.Os}} | |
Size: {{.Size}} | |
Metadata: {{.Metadata}} | |
' ${{ secrets.REGISTRY_LOGIN_SERVER }}/ssl-checker-webapp:latest | |
echo '--------------------' | |
build-and-push-to-dockerhub: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: 'Checkout GitHub Action' | |
uses: actions/checkout@v4 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- run: | | |
docker build . -t ${{ secrets.DOCKERHUB_USERNAME }}/ssl-checker-webapp:${{ github.sha }} | |
docker tag ${{ secrets.DOCKERHUB_USERNAME }}/ssl-checker-webapp:${{ github.sha }} ${{ secrets.DOCKERHUB_USERNAME }}/ssl-checker-webapp:latest | |
docker push ${{ secrets.DOCKERHUB_USERNAME }}/ssl-checker-webapp:${{ github.sha }} | |
docker push ${{ secrets.DOCKERHUB_USERNAME }}/ssl-checker-webapp:latest | |
echo '--------------------' | |
docker inspect --format ' | |
ID: {{.Id}} | |
RepoTags: {{.RepoTags}} | |
RepoDigests: {{.RepoDigests}} | |
Created: {{.Created}} | |
Author: {{.Author}} | |
Architecture: {{.Architecture}} | |
OS: {{.Os}} | |
Size: {{.Size}} | |
Metadata: {{.Metadata}} | |
' ${{ secrets.DOCKERHUB_USERNAME }}/ssl-checker-webapp:latest | |
echo '--------------------' |